2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
2017-08-10 23:36:55 +08:00
|
|
|
/**
|
|
|
|
* User doesn't need to be logged in for these
|
|
|
|
*/
|
2019-10-30 21:05:18 +08:00
|
|
|
use App\Http\Middleware\SetActiveTheme;
|
|
|
|
|
2017-08-10 23:36:55 +08:00
|
|
|
Route::group([
|
2019-10-30 21:05:18 +08:00
|
|
|
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
|
|
|
|
'middleware' => [SetActiveTheme::class],
|
2018-03-20 09:50:40 +08:00
|
|
|
], function () {
|
2018-01-12 11:35:03 +08:00
|
|
|
Route::get('/', 'HomeController@index')->name('home');
|
2017-12-28 06:47:22 +08:00
|
|
|
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');
|
2018-01-20 06:07:31 +08:00
|
|
|
|
2019-08-06 01:07:22 +08:00
|
|
|
Route::get('livemap', 'LiveMapController@index')->name('livemap.index');
|
2017-08-10 23:36:55 +08:00
|
|
|
});
|
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([
|
2018-03-20 09:50:40 +08:00
|
|
|
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
|
2019-10-30 21:05:18 +08:00
|
|
|
'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
|
|
|
|
2018-03-28 00:40:37 +08:00
|
|
|
Route::get('airports/{id}', 'AirportController@show')->name('airports.show');
|
|
|
|
|
2018-04-03 01:55:37 +08:00
|
|
|
// 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');
|
2018-04-03 01:55:37 +08:00
|
|
|
|
2018-03-21 00:28:06 +08:00
|
|
|
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
|
|
|
|
2018-02-25 05:38:25 +08:00
|
|
|
Route::get('pireps/fares', 'PirepController@fares');
|
2017-08-09 09:34:36 +08:00
|
|
|
Route::resource('pireps', 'PirepController');
|
2018-05-10 23:35:10 +08:00
|
|
|
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
|
|
|
});
|
2017-06-12 00:36:16 +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');
|
2017-06-12 04:37:57 +08:00
|
|
|
|
2019-07-18 22:51:05 +08:00
|
|
|
require app_path('Http/Routes/admin.php');
|