Detailing fungsi semua modul dari bugs error
This commit is contained in:
@@ -49,9 +49,11 @@ class DepartmentController extends Controller
|
||||
->with('success', 'Departemen baru berhasil ditambahkan.');
|
||||
}
|
||||
|
||||
public function show(Department $department)
|
||||
public function show($id)
|
||||
{
|
||||
// Hanya melempar object $department ke view tanpa load relasi positions
|
||||
// Pastikan kita me-load relasi 'users' (Karyawan) beserta 'position' (Jabatan) mereka
|
||||
$department = \App\Models\Department::with(['users.position'])->findOrFail($id);
|
||||
|
||||
return view('pages.admin.departments.show', compact('department'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user