PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
plugins
/
ecommerce
/
src
/
Models
<?php namespace Botble\Ecommerce\Models; use Botble\Base\Models\BaseModel; use Illuminate\Database\Eloquent\Relations\BelongsTo; class OrderProduct extends BaseModel { /** * @var string */ protected $table = 'ec_order_product'; /** * @var array */ protected $fillable = [ 'order_id', 'product_id', 'product_name', 'qty', 'weight', 'price', 'tax_amount', 'options', 'restock_quantity', ]; /** * @var array */ protected $dates = [ 'created_at', 'updated_at', ]; /** * @var array */ protected $casts = [ 'options' => 'json', ]; /** * @return BelongsTo */ public function product() { return $this->belongsTo(Product::class)->withDefault(); } /** * @return BelongsTo */ public function order() { return $this->belongsTo(Order::class)->withDefault(); } /** * @return string */ public function getAmountFormatAttribute() { return format_price($this->price); } /** * @return string */ public function getTotalFormatAttribute() { return format_price($this->price * $this->qty); } }
[-] ProductLabelTranslation.php
[edit]
[-] Review.php
[edit]
[-] ShippingRule.php
[edit]
[+]
..
[-] Discount.php
[edit]
[-] Address.php
[edit]
[-] GroupedProduct.php
[edit]
[-] StoreLocator.php
[edit]
[-] ProductAttribute.php
[edit]
[-] OrderHistory.php
[edit]
[-] ShipmentHistory.php
[edit]
[-] ProductVariation.php
[edit]
[-] DiscountProductCollection.php
[edit]
[-] ProductAttributeTranslation.php
[edit]
[-] ProductCollection.php
[edit]
[-] Order.php
[edit]
[-] Wishlist.php
[edit]
[-] ProductTag.php
[edit]
[-] Customer.php
[edit]
[-] BrandTranslation.php
[edit]
[-] Tax.php
[edit]
[-] FlashSale.php
[edit]
[-] ProductAttributeSetTranslation.php
[edit]
[-] ProductCollectionTranslation.php
[edit]
[-] OrderAddress.php
[edit]
[-] DiscountProduct.php
[edit]
[-] DiscountCustomer.php
[edit]
[-] Shipping.php
[edit]
[-] Brand.php
[edit]
[-] ProductTranslation.php
[edit]
[-] ProductVariationItem.php
[edit]
[-] Product.php
[edit]
[-] ProductLabel.php
[edit]
[-] OrderProduct.php
[edit]
[-] Currency.php
[edit]
[-] ShippingRuleItem.php
[edit]
[-] ProductAttributeSet.php
[edit]
[-] FlashSaleTranslation.php
[edit]
[-] ProductCategory.php
[edit]
[-] Shipment.php
[edit]
[-] ProductCategoryTranslation.php
[edit]