2017-06-10 03:47:02 +08:00
|
|
|
<?php
|
|
|
|
/**
|
2017-06-21 22:22:59 +08:00
|
|
|
* Admin Routes
|
2017-06-10 03:47:02 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
Route::group([
|
2017-06-21 22:22:59 +08:00
|
|
|
'namespace' => 'Admin', 'prefix' => 'admin', 'as' => 'admin.',
|
|
|
|
'middleware' => ['role:admin'],
|
|
|
|
], function () {
|
2017-06-12 00:36:16 +08:00
|
|
|
Route::resource('airports', 'AirportController');
|
2017-06-10 03:47:02 +08:00
|
|
|
Route::resource('airlines', 'AirlinesController');
|
2017-06-10 11:19:17 +08:00
|
|
|
Route::resource('aircraftclasses', 'AircraftClassController');
|
2017-06-11 09:27:24 +08:00
|
|
|
Route::resource('fares', 'FareController');
|
2017-06-21 22:22:59 +08:00
|
|
|
|
|
|
|
# aircraft and fare associations
|
|
|
|
Route::resource('aircraft', 'AircraftController');
|
|
|
|
Route::match(['get', 'post', 'put', 'delete'], 'aircraft/{id}/fares', 'AircraftController@fares');
|
|
|
|
|
|
|
|
# flights and aircraft associations
|
|
|
|
Route::resource('flights', 'FlightController');
|
|
|
|
Route::match(['get', 'post', 'put', 'delete'], 'flights/{id}/aircraft', 'FlightController@aircraft');
|
|
|
|
|
|
|
|
# view/update settings
|
|
|
|
Route::match(['get'], 'settings', 'SettingsController@index');
|
|
|
|
Route::match(['post', 'put'], 'settings', 'SettingsController@update');
|
|
|
|
|
|
|
|
# defaults
|
|
|
|
Route::get('', ['uses' => 'DashboardController@index']);
|
|
|
|
Route::get('/', ['uses' => 'DashboardController@index']);
|
|
|
|
Route::get('/dashboard', ['uses' => 'DashboardController@index', 'name' => 'dashboard']);
|
|
|
|
});
|