phpvms/routes/web.php

36 lines
976 B
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
2017-06-10 04:07:29 +08:00
Route::get('/', 'HomeController@index');
/**
* User doesn't need to be logged in for these
*/
Route::group([
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.'
], function() {
2017-08-17 07:18:47 +08:00
Route::get('/r/{id}', 'PirepController@show');
Route::get('/p/{id}', 'ProfileController@show');
});
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([
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
'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-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-08-04 10:02:02 +08:00
Route::match(['post'], 'flights/save', 'FlightController@save');
Route::resource('profile', 'ProfileController');
2017-08-09 09:34:36 +08:00
Route::resource('pireps', 'PirepController');
2017-06-09 09:02:52 +08:00
});
Auth::routes();
2017-06-22 06:45:37 +08:00
Route::get('/logout', 'Auth\LoginController@logout');
2017-06-21 22:22:59 +08:00
require base_path('routes/admin.php');