add default with company and item models

This commit is contained in:
Cüneyt Şentürk 2023-05-31 14:51:01 +03:00
parent d50daa3fd8
commit acf002f35d
3 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,8 @@ class Company extends Eloquent implements Ownable
protected $table = 'companies';
protected $with = ['settings'];
/**
* The accessors to append to the model's array form.
*

View File

@ -16,6 +16,13 @@ class Item extends Model
protected $table = 'items';
/**
* The relationships that should always be loaded.
*
* @var array
*/
protected $with = ['taxes'];
/**
* The accessors to append to the model's array form.
*

View File

@ -15,6 +15,13 @@ class DocumentItem extends Model
protected $table = 'document_items';
/**
* The relationships that should always be loaded.
*
* @var array
*/
protected $with = ['taxes'];
protected $appends = ['discount'];
protected $fillable = [