fixed relation for sub-categories
This commit is contained in:
parent
c63f082ef2
commit
8f483ebb6b
@ -105,7 +105,7 @@ class Transaction extends Model
|
||||
|
||||
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()
|
||||
|
@ -55,7 +55,7 @@ class Item extends Model
|
||||
|
||||
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()
|
||||
|
@ -93,7 +93,7 @@ class Document extends Model
|
||||
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user