phpvms/routes/web.php

50 lines
968 B
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/
Route::get('/', function () {
return redirect('home');
});
Route::get('/home', 'HomeController@index');
2017-06-09 09:02:52 +08:00
2017-06-09 09:56:57 +08:00
/**
* User routes that require auth
*/
2017-06-09 09:02:52 +08:00
2017-06-09 09:56:57 +08:00
Route::group([
'namespace' => 'User',
'middleware' => 'auth',
], function () {
});
2017-06-09 09:02:52 +08:00
/**
* Admin routes
*/
2017-06-09 09:46:50 +08:00
Route::get('/admin', function () {
return redirect('/admin/airlines');
});
2017-06-09 09:02:52 +08:00
Route::group([
'namespace' => 'Admin',
'middleware' => 'auth',
'prefix' => 'admin',
], function () {
Route::resource('airlines', 'AirlinesController');
2017-06-09 09:37:05 +08:00
Route::resource('aircraft', 'AircraftController');
2017-06-09 09:02:52 +08:00
});
2017-06-09 09:37:05 +08:00