Tambahkan kolom role di tabel pengguna

Mengubah query di UsersController untuk mengambil data roles. Memperbarui tampilan di users/index.blade.php untuk menampilkan kolom role dengan informasi yang sesuai.
This commit is contained in:
Daeng Deni Mardaeni
2024-11-17 11:43:19 +07:00
parent f362bdd32f
commit a2bff61998
2 changed files with 11 additions and 1 deletions

View File

@@ -105,7 +105,7 @@
$filteredRecords = $query->count();
// Get the data for the current page
$users = $query->with('branch')->get();
$users = $query->with(['branch','roles'])->get();
// Calculate the page count
$pageCount = ceil($totalRecords / $request->get('size'));