2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
2017-06-10 04:07:29 +08:00
|
|
|
Route::get('/', 'HomeController@index');
|
2017-06-09 02:28:26 +08:00
|
|
|
Route::get('/home', 'HomeController@index');
|
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 02:13:08 +08:00
|
|
|
Route::resource('profile', 'ProfileController');
|
2017-08-03 04:29:04 +08:00
|
|
|
|
2017-08-03 04:12:18 +08:00
|
|
|
Route::resource('flights', 'FlightController');
|
2017-08-03 04:29:04 +08:00
|
|
|
Route::match(['get'], 'flights/search', 'FlightController@search');
|
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-06-22 06:45:37 +08:00
|
|
|
Route::get('/logout', 'Auth\LoginController@logout');
|
2017-06-12 04:37:57 +08:00
|
|
|
|
2017-06-21 22:22:59 +08:00
|
|
|
require base_path('routes/admin.php');
|