1 | <?php
|
---|
2 |
|
---|
3 | use App\Http\Controllers\CrimeCaseController;
|
---|
4 | use App\Http\Controllers\OfficerController;
|
---|
5 | use App\Http\Controllers\PeopleController;
|
---|
6 | use App\Http\Controllers\SessionsController;
|
---|
7 | use Illuminate\Support\Facades\Route;
|
---|
8 | use 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 |
|
---|
21 | Route::get('/', function () {
|
---|
22 | return view('welcome');
|
---|
23 | });
|
---|
24 | Route::get('/login', function () {
|
---|
25 | return view('login');
|
---|
26 |
|
---|
27 | });
|
---|
28 |
|
---|
29 | Route::post('/login', [SessionsController::class, 'store']);
|
---|
30 |
|
---|
31 |
|
---|
32 | Route::get('logout', [SessionsController::class, 'logout']);
|
---|
33 |
|
---|
34 |
|
---|
35 |
|
---|
36 | Route::get('employees', [OfficerController::class, 'employees'])->middleware('guest');
|
---|
37 | Route::get('filter', [PeopleController::class, 'filter'])->middleware('guest');
|
---|
38 | Route::post('filter', [PeopleController::class, 'filter_post'])->middleware('guest');
|
---|
39 |
|
---|
40 | Route::get('cases', [CrimeCaseController::class, 'cases'])->middleware('guest');
|
---|
41 | Route::get('case/{wildcard}', [CrimeCaseController::class, 'case'])->middleware('guest');
|
---|
42 |
|
---|
43 | Route::get('finished_cases', [CrimeCaseController::class, 'index'])->middleware('guest');
|
---|
44 |
|
---|
45 |
|
---|
46 | Route::get('register-policeman', [OfficerController::class, 'register'])->middleware('guest');
|
---|
47 | Route::post('register-policeman', [OfficerController::class, 'register_post'])->middleware('guest');
|
---|
48 |
|
---|
49 | Route::post('/get-person', [PeopleController::class, 'getPerson']);
|
---|