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