write test for the lists
This commit is contained in:
@@ -65,6 +65,15 @@ class RoadItemsProjectController extends Controller
|
||||
allowedFilters: $allowedFilters,
|
||||
allowedSortings: $allowedSortings);
|
||||
|
||||
|
||||
foreach ($data['data'] as $road_item) {
|
||||
if (Gate::allows('gate-supervise-road-item', $road_item)) {
|
||||
$road_item['can_supervise'] = 1;
|
||||
} else {
|
||||
$road_item['can_supervise'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user