phpvms/app/Routes/web.php

43 lines
1.3 KiB
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
/**
* 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');
Route::get('r/{id}', 'PirepController@show')->name('pirep.show.public');
Route::get('p/{id}', 'ProfileController@show')->name('profile.show.public');
Route::get('users', 'UserController@index')->name('users.show');
Route::get('pilots', 'UserController@index')->name('users.show');
Route::get('livemap', 'AcarsController@index')->name('livemap.public');
});
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-12-05 04:21:46 +08:00
Route::get('flights/search', 'FlightController@search')->name('flights.search');
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
});
Auth::routes();
2017-12-05 04:21:46 +08:00
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
require app_path('Routes/admin.php');