source: routes/web.php@ 92df8cd

main
Last change on this file since 92df8cd was 92df8cd, checked in by bube-ristovska <ristovska725@…>, 9 months ago

Add policeman

  • Property mode set to 100644
File size: 1.7 KB
Line 
1<?php
2
3use App\Http\Controllers\CrimeCaseController;
4use App\Http\Controllers\OfficerController;
5use App\Http\Controllers\PeopleController;
6use App\Http\Controllers\SessionsController;
7use Illuminate\Support\Facades\Route;
8use Illuminate\Support\Facades\Session;
9
10/*
11|--------------------------------------------------------------------------
12| Web Routes
13|--------------------------------------------------------------------------
14|
15| Here is where you can register web routes for your application. These
16| routes are loaded by the RouteServiceProvider and all of them will
17| be assigned to the "web" middleware group. Make something great!
18|
19*/
20
21Route::get('/', function () {
22 if(Session::get('pe_id') == null) {
23 return view('login');
24 }
25 return view('welcome');
26});
27Route::get('/login', function () {
28 return view('login');
29
30});
31
32Route::post('/login', [SessionsController::class, 'store']);
33
34
35Route::get('logout', [SessionsController::class, 'logout']);
36
37
38
39Route::get('employees', [OfficerController::class, 'employees'])->middleware('guest');
40Route::get('filter', [PeopleController::class, 'filter'])->middleware('guest');
41Route::post('filter', [PeopleController::class, 'filter_post'])->middleware('guest');
42
43Route::get('cases', [CrimeCaseController::class, 'cases'])->middleware('guest');
44Route::get('case/{wildcard}', [CrimeCaseController::class, 'case'])->middleware('guest');
45
46Route::get('finished_cases', [CrimeCaseController::class, 'index'])->middleware('guest');
47
48
49Route::get('register-policeman', [OfficerController::class, 'register'])->middleware('guest');
50Route::post('register-policeman', [OfficerController::class, 'register_post'])->middleware('guest');
51
52Route::post('/get-person', [PeopleController::class, 'getPerson']);
Note: See TracBrowser for help on using the repository browser.