Skip to content

Commit

Permalink
add special response on AIS
Browse files Browse the repository at this point in the history
  • Loading branch information
punkestu committed Nov 3, 2024
1 parent 8525efb commit 4fd0574
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Http/Controllers/PersonelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ public function cabang(Request $request, $id)
}])->find($id);
}
if (!$cabang) abort(404);
if ($cabang->nama === 'PUSAT INFORMASI AERONAUTIKA') {
if ($request->tab != "AIS") $cabang->personels = [];
else {
$cabang = Cabang::with(['personels' => function ($query) use ($limit, $page) {
$query->limit($limit)->offset($page * $limit);
}])->find($id);
}
}
return view('personel.cabang', [
'cabang' => $cabang,
'tab' => $request->tab ?? 'ATC',
Expand Down

0 comments on commit 4fd0574

Please sign in to comment.