mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 00:02:05 -04:00
25 lines
565 B
PHP
25 lines
565 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Modules\Seller\Entities\SellerProduct;
|
|
use App\Models\User;
|
|
|
|
class RecentViewProduct extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $guarded = ['id'];
|
|
|
|
public function sellerProduct()
|
|
{
|
|
return $this->belongsTo(SellerProduct::class,'seller_product_id','id')->activeSeller()->withDefault();
|
|
}
|
|
|
|
public function customer()
|
|
{
|
|
return $this->belongsTo(User::class,'user_id','id')->withDefault();
|
|
}
|
|
}
|