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
|
|
|
|
*/
|
|
|
|
Route::group([
|
|
|
|
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.'
|
|
|
|
], 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');
|
|
|
|
|
|
|
|
Route::get('livemap', 'AcarsController@index')->name('livemap.public');
|
2017-08-10 23:36:55 +08:00
|
|
|
});
|
2017-06-09 09:56:57 +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([
|
2017-08-03 02:13:08 +08:00
|
|
|
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
|
2017-06-12 00:36:16 +08:00
|
|
|
'middleware' => ['role:admin|user'],
|
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
|
|
|
|
2017-12-05 04:21:46 +08:00
|
|
|
Route::get('flights/search', 'FlightController@search')->name('flights.search');
|
2017-12-28 06:47:22 +08:00
|
|
|
Route::post('flights/save', 'FlightController@save')->name('flights.save');
|
2017-08-03 04:12:18 +08:00
|
|
|
Route::resource('flights', 'FlightController');
|
2017-08-04 10:02:02 +08:00
|
|
|
|
2017-08-09 09:34:36 +08:00
|
|
|
Route::resource('pireps', 'PirepController');
|
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
|
|
|
|
2017-06-12 04:37:57 +08:00
|
|
|
Auth::routes();
|
2017-12-05 04:21:46 +08:00
|
|
|
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
|
2017-06-12 04:37:57 +08:00
|
|
|
|
2017-12-15 00:38:10 +08:00
|
|
|
require app_path('Routes/admin.php');
|