+ @include('components.table-component', [
+ 'pageTitle' => 'User Management',
+ 'data' => [],
+ 'columns' => [
+ ['name' => 'Username', 'key' => 'username', 'sortable' => true],
+ ['name' => 'First Name', 'key' => 'firstName', 'sortable' => true],
+ ['name' => 'Last Name', 'key' => 'lastName', 'sortable' => true],
+ ['name' => 'User Role', 'key' => 'role', 'sortable' => true],
+ ['name' => 'Email', 'key' => 'email', 'sortable' => true],
+ ['name' => 'Status', 'key' => 'status', 'sortable' => true]
+ ],
+ 'actions' => ['edit', 'view', 'delete'],
+ 'showAddButton' => true,
+ 'addButtonUrl' => '/add-user',
+ 'showCheckboxes' => true,
+ 'showBatchDelete' => true,
+ 'showEditModal' => true,
+ 'showViewModal' => true
+ ])
+
+
- @include('components.table-component', [
- 'pageTitle' => 'User Management',
- 'data' => $users,
- 'columns' => [
- ['name' => 'Username', 'key' => 'username', 'sortable' => true],
- ['name' => 'First Name', 'key' => 'firstName', 'sortable' => true],
- ['name' => 'Last Name', 'key' => 'lastName', 'sortable' => true],
- ['name' => 'User Role', 'key' => 'role', 'sortable' => true],
- ['name' => 'Email', 'key' => 'email', 'sortable' => true],
- ['name' => 'Status', 'key' => 'status', 'sortable' => true]
- ],
- 'actions' => ['edit', 'view', 'delete'],
- 'showAddButton' => true,
- 'addButtonUrl' => '/add-user',
- 'showCheckboxes' => true,
- 'showBatchDelete' => true,
- 'showEditModal' => true,
- 'showViewModal' => true
- ])
+
@endsection
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 01b0536..bf3d5be 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -11,25 +11,15 @@ Route::get('/', function () {
return redirect()->route('login');
});
-// Show login form
+
Route::get('/login', [AuthController::class, 'showLoginForm'])->name('login');
-
-// Handle login form submission
Route::post('/login', [AuthController::class, 'login'])->name('login');
-
-// Show change password form
Route::get('/change-password', [AuthController::class, 'showChangePasswordForm'])->name('password.change.form');
-
-// Handle change password form submission
Route::post('/change-password', [AuthController::class, 'changePassword'])->name('password.change');
-
-// Redirect to my-profile (adjust as needed)
Route::get('/my-profile', [AuthController::class, 'showMyProfile'])->name('my-profile')->middleware('auth');
-// Handle logout
Route::post('/logout', [AuthController::class, 'logout'])->name('logout');
-
Route::get('/dashboard', function () {
return view('dashboard');
});