PATH:
home
/
lab2454c
/
.trash
/
core
/
app
/
Models
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Product extends Model { use HasFactory; protected $casts = [ 'keyword' => 'object' ]; protected $fillable = [ 'featured', 'title', 'sub_title', 'amount', 'keyword', 'time_duration', 'description', 'package' ]; public function user() { return $this->belongsTo(User::class, 'user_id'); } public function category() { return $this->belongsTo(Category::class, 'category_id'); } public function subCategory() { return $this->belongsTo(SubCategory::class, 'sub_category_id'); } public function productSpecification() { return $this->hasMany(ProductSpecification::class, 'product_id'); } public function review() { return $this->hasMany(Review::class, 'product_id'); } public function order() { return $this->hasMany(Order::class, 'product_id')->where('status', 1); } public function brand() { return $this->belongsTo(Brand::class, 'brand_id'); } public function productImages() { return $this->hasMany(ProductImage::class); } //Many to Many public function collections() { return $this->belongsToMany(Collection::class, 'collection_product')->withPivot('created_at'); } }
[-] GeneralSetting.php
[edit]
[-] DynamicPage.php
[edit]
[-] Showcase.php
[edit]
[-] AdminPasswordReset.php
[edit]
[-] WithdrawMethod.php
[edit]
[-] HomeImage.php
[edit]
[-] Language.php
[edit]
[-] Review.php
[edit]
[-] EmailLog.php
[edit]
[-] ProductContent.php
[edit]
[+]
..
[-] FashionNftImage.php
[edit]
[-] EmailTemplate.php
[edit]
[-] Frontend.php
[edit]
[-] AdminNotification.php
[edit]
[-] Extension.php
[edit]
[-] GatewayCurrency.php
[edit]
[-] Category.php
[edit]
[-] Order.php
[edit]
[-] SupportTicket.php
[edit]
[-] SupportMessage.php
[edit]
[-] Withdrawal.php
[edit]
[-] UserLogin.php
[edit]
[-] SmsTemplate.php
[edit]
[-] Brand.php
[edit]
[-] Contact.php
[edit]
[-] PasswordReset.php
[edit]
[-] Page.php
[edit]
[-] Advertisement.php
[edit]
[-] Transaction.php
[edit]
[-] ProductSpecification.php
[edit]
[-] SupportAttachment.php
[edit]
[-] FashionNft.php
[edit]
[-] Product.php
[edit]
[-] Specification.php
[edit]
[-] ProductReport.php
[edit]
[-] Gateway.php
[edit]
[-] Subcategory.php
[edit]
[-] Admin.php
[edit]
[-] Deposit.php
[edit]
[-] MomentContent.php
[edit]
[-] User.php
[edit]
[-] ContactReply.php
[edit]
[-] ProductImage.php
[edit]
[-] FaqContent.php
[edit]
[-] Collection.php
[edit]