PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
plugins
/
ecommerce
/
src
/
Models
<?php namespace Botble\Ecommerce\Models; use Botble\Base\Enums\BaseStatusEnum; use Botble\Base\Models\BaseModel; use Botble\Base\Traits\EnumCastable; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Review extends BaseModel { use EnumCastable; /** * @var string */ protected $table = 'ec_reviews'; /** * @var array */ protected $fillable = [ 'product_id', 'customer_id', 'star', 'comment', 'status', 'images', ]; /** * @var array */ protected $casts = [ 'status' => BaseStatusEnum::class, 'images' => 'array', ]; /** * @return BelongsTo */ public function user() { return $this->belongsTo(Customer::class, 'customer_id', 'id')->withDefault(); } /** * @return BelongsTo */ public function product() { return $this->belongsTo(Product::class)->withDefault(); } /** * @return string */ public function getProductNameAttribute() { return $this->product->name; } /** * @return string */ public function getUserNameAttribute() { return $this->user->name; } }
[-] 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]