hide the pivot table data

This commit is contained in:
2024-12-24 14:16:36 +03:30
parent 70872af9ac
commit 765e155b25
2 changed files with 3 additions and 3 deletions

View File

@@ -10,6 +10,6 @@ class CMMSMachine extends Model
use HasFactory; use HasFactory;
protected $table = 'cmms_machines'; protected $table = 'cmms_machines';
protected $hidden = ['pivot'];
protected $guarded = []; protected $guarded = [];
} }

View File

@@ -171,8 +171,8 @@ class RoadItemsProject extends Model
{ {
return $this->belongsToMany(CMMSMachine::class, return $this->belongsToMany(CMMSMachine::class,
'cmms_machine_road_items_project', 'cmms_machine_road_items_project',
'machine_id', 'road_items_project_id',
'road_items_project_id' 'machine_id'
); );
} }