query('menu_id') ?? $request->input('menu_id'); $filter = $request->query('filter'); $permissions = $this->permissions[$menuId]?? []; // Avoid undefined index error $creator = $permissions['allow_create'] ?? 0; $updater = $permissions['allow_update'] ?? 0; $destroyer = $permissions['allow_destroy'] ?? 0; return view('pbg_task.index', [ 'creator' => $creator, 'updater' => $updater, 'destroyer' => $destroyer, 'filter' => $filter, 'filterOptions' => PbgTaskFilterData::getAllOptions(), ]); } /** * Show the form for creating a new resource. */ public function create() { return view("pbg_task.create"); } /** * Store a newly created resource in storage. */ public function store(Request $request) { } /** * Display the specified resource. */ public function show(string $id) { $data = PbgTask::with(['pbg_task_retributions','pbg_task_index_integrations', 'pbg_task_retributions.pbg_task_prasarana'])->findOrFail($id); $statusOptions = PbgTaskStatus::getStatuses(); $applicationTypes = PbgTaskApplicationTypes::labels(); return view("pbg_task.show", compact("data", 'statusOptions', 'applicationTypes')); } /** * Show the form for editing the specified resource. */ public function edit(string $id) { return view("pbg_task.edit"); } /** * Update the specified resource in storage. */ public function update(Request $request, string $id) { // } /** * Remove the specified resource from storage. */ public function destroy(string $id) { // } }