first change
This commit is contained in:
32
Modules/Product/app/Models/Product.php
Normal file
32
Modules/Product/app/Models/Product.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user