phpvms/app/Http/Routes/web.php

54 lines
1.9 KiB
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
/**
* User doesn't need to be logged in for these
*/
use App\Http\Middleware\SetActiveTheme;
Route::group([
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
'middleware' => [SetActiveTheme::class],
], function () {
2018-01-12 11:35:03 +08:00
Route::get('/', 'HomeController@index')->name('home');
Route::get('r/{id}', 'PirepController@show')->name('pirep.show.public');
Route::get('p/{id}', 'ProfileController@show')->name('profile.show.public');
2018-04-03 07:37:41 +08:00
Route::get('users', 'UserController@index')->name('users.index');
Route::get('pilots', 'UserController@index')->name('pilots.index');
Route::get('livemap', 'LiveMapController@index')->name('livemap.index');
});
2017-06-09 09:56:57 +08:00
2018-08-27 00:40:04 +08:00
/*
2017-06-21 22:22:59 +08:00
* These are only visible to a logged in user
*/
2017-06-09 09:02:52 +08:00
Route::group([
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
'middleware' => ['role:admin|user', SetActiveTheme::class],
2017-06-09 09:02:52 +08:00
], function () {
2017-06-10 04:07:29 +08:00
Route::resource('dashboard', 'DashboardController');
2017-08-03 04:29:04 +08:00
Route::get('airports/{id}', 'AirportController@show')->name('airports.show');
// Download a file
2018-04-03 07:37:41 +08:00
Route::get('downloads', 'DownloadController@index')->name('downloads.index');
Route::get('downloads/{id}', 'DownloadController@show')->name('downloads.download');
Route::get('flights/bids', 'FlightController@bids')->name('flights.bids');
2017-12-05 04:21:46 +08:00
Route::get('flights/search', 'FlightController@search')->name('flights.search');
2017-08-03 04:12:18 +08:00
Route::resource('flights', 'FlightController');
2017-08-04 10:02:02 +08:00
Route::get('pireps/fares', 'PirepController@fares');
2017-08-09 09:34:36 +08:00
Route::resource('pireps', 'PirepController');
Route::post('pireps/{id}/submit', 'PirepController@submit')->name('pireps.submit');
2018-01-01 03:08:41 +08:00
Route::get('profile/regen_apikey', 'ProfileController@regen_apikey')
->name('profile.regen_apikey');
Route::resource('profile', 'ProfileController');
2017-06-09 09:02:52 +08:00
});
2018-09-09 21:48:32 +08:00
Auth::routes(['verify' => true]);
2017-12-05 04:21:46 +08:00
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
require app_path('Http/Routes/admin.php');