33 lines
630 B
PHP
33 lines
630 B
PHP
<?php
|
|
|
|
namespace Modules\Product\Models;
|
|
|
|
use App\Traits\CreatedUpdatedBy;
|
|
use App\Traits\StatusTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Modules\Client\Models\Client;
|
|
|
|
class Product extends Model
|
|
{
|
|
use StatusTrait, CreatedUpdatedBy;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'description',
|
|
'usps',
|
|
'client_id',
|
|
'status',
|
|
'createdby',
|
|
'updatedby',
|
|
];
|
|
|
|
protected $appends = ['status_name'];
|
|
public function client()
|
|
{
|
|
return $this->belongsTo(Client::class, 'client_id');
|
|
}
|
|
}
|