hide the pivot table data
This commit is contained in:
@@ -10,6 +10,6 @@ class CMMSMachine extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'cmms_machines';
|
||||
|
||||
protected $hidden = ['pivot'];
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ class RoadItemsProject extends Model
|
||||
{
|
||||
return $this->belongsToMany(CMMSMachine::class,
|
||||
'cmms_machine_road_items_project',
|
||||
'machine_id',
|
||||
'road_items_project_id'
|
||||
'road_items_project_id',
|
||||
'machine_id'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user