fixed relation for sub-categories

This commit is contained in:
Denis Duliçi 2022-07-22 00:52:06 +03:00
parent c63f082ef2
commit 8f483ebb6b
3 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ class Transaction extends Model
public function category() public function category()
{ {
return $this->belongsTo('App\Models\Setting\Category')->withDefault(['name' => trans('general.na')]); return $this->belongsTo('App\Models\Setting\Category')->withoutGlobalScope('App\Scopes\Category')->withDefault(['name' => trans('general.na')]);
} }
public function children() public function children()

View File

@ -55,7 +55,7 @@ class Item extends Model
public function category() public function category()
{ {
return $this->belongsTo('App\Models\Setting\Category')->withDefault(['name' => trans('general.na')]); return $this->belongsTo('App\Models\Setting\Category')->withoutGlobalScope('App\Scopes\Category')->withDefault(['name' => trans('general.na')]);
} }
public function taxes() public function taxes()

View File

@ -93,7 +93,7 @@ class Document extends Model
public function category() public function category()
{ {
return $this->belongsTo('App\Models\Setting\Category')->withDefault(['name' => trans('general.na')]); return $this->belongsTo('App\Models\Setting\Category')->withoutGlobalScope('App\Scopes\Category')->withDefault(['name' => trans('general.na')]);
} }
public function children() public function children()