Changeset 5372778 for routes/web.php
- Timestamp:
- 08/26/24 14:20:34 (3 months ago)
- Branches:
- main
- Children:
- 3c89e27
- Parents:
- 8a258ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
routes/web.php
r8a258ab r5372778 19 19 */ 20 20 21 Route::get('/', function () { 22 return view('welcome'); 23 }); 21 // UNAUTHORIZED 24 22 Route::get('/login', function () { 25 23 return view('login'); 26 24 27 25 }); 28 29 26 Route::post('/login', [SessionsController::class, 'store']); 30 27 28 Route::get('/unauth', function () { 29 return view('unauth'); // Make sure there is a view file named `unauth.blade.php` 30 })->name('unauth'); // Name the route 'unauth' 31 31 32 // AUTHORIZED 33 // POLICEMAN 34 Route::get('register-statement', [CrimeCaseController::class, 'register_statement'])->middleware('policeman'); 35 Route::post('register-statement', [CrimeCaseController::class, 'register_statement_post'])->middleware('policeman'); 36 37 // OFFICER 38 Route::get('register-policeman', [OfficerController::class, 'register'])->middleware('officer'); 39 Route::post('register-policeman', [OfficerController::class, 'register_post'])->middleware('officer'); 40 41 // BOTH 42 Route::get('/', function () { 43 return view('welcome'); 44 })->middleware('both'); 32 45 Route::get('logout', [SessionsController::class, 'logout']); 33 46 47 Route::get('employees', [OfficerController::class, 'employees'])->middleware('both'); 48 Route::get('/employees/{id}', [OfficerController::class, 'show'])->middleware('both'); 34 49 50 Route::get('filter', [PeopleController::class, 'filter'])->middleware('both'); 51 Route::post('filter', [PeopleController::class, 'filter_post'])->middleware('both'); 35 52 36 Route::get('employees', [OfficerController::class, 'employees'])->middleware('guest'); 37 Route::get('/employees/{id}', [OfficerController::class, 'show']); 53 Route::get('cases', [CrimeCaseController::class, 'cases'])->middleware('both'); 54 Route::get('case/{wildcard}', [CrimeCaseController::class, 'case'])->middleware('both'); 55 Route::get('finished_cases', [CrimeCaseController::class, 'finished_cases'])->middleware('both'); 38 56 39 Route::get('filter', [PeopleController::class, 'filter'])->middleware('guest'); 40 Route::post('filter', [PeopleController::class, 'filter_post'])->middleware('guest'); 41 42 Route::get('cases', [CrimeCaseController::class, 'cases'])->middleware('guest'); 43 44 Route::get('case/{wildcard}', [CrimeCaseController::class, 'case'])->name('case')->middleware('guest'); 45 46 Route::get('finished_cases', [CrimeCaseController::class, 'finished_cases'])->middleware('guest'); 47 48 49 Route::get('register-policeman', [OfficerController::class, 'register'])->middleware('guest'); 50 Route::post('register-policeman', [OfficerController::class, 'register_post'])->middleware('guest'); 51 52 Route::get('register-statement', [CrimeCaseController::class, 'register_statement'])->middleware('guest'); 53 Route::post('register-statement', [CrimeCaseController::class, 'register_statement_post'])->middleware('guest'); 54 55 56 57 Route::post('/get-person', [PeopleController::class, 'getPerson']); 57 Route::post('/get-person', [PeopleController::class, 'getPerson'])->middleware('both');
Note:
See TracChangeset
for help on using the changeset viewer.