Introduce HasSettingFilter that'll redirect to setup
This commit is contained in:
+8
-5
@@ -1,7 +1,13 @@
|
||||
<?php
|
||||
|
||||
Route::get('/', 'HomeController@showIndex');
|
||||
Route::get('/incident/{incident}', 'HomeController@showIncident');
|
||||
// Prevent access until the app is setup.
|
||||
Route::group(['before' => 'has_setting:app_name'], function() {
|
||||
Route::get('/', 'HomeController@showIndex');
|
||||
Route::get('/incident/{incident}', 'HomeController@showIncident');
|
||||
|
||||
Route::get('/auth/login', 'AuthController@showLogin')->before('guest');
|
||||
Route::post('/auth/login', 'AuthController@postLogin')->before('guest|csrf');
|
||||
});
|
||||
|
||||
Route::group(['before' => 'no_setup:app_name'], function() {
|
||||
Route::get('/setup', 'SetupController@showSetup');
|
||||
@@ -10,9 +16,6 @@ Route::group(['before' => 'no_setup:app_name'], function() {
|
||||
});
|
||||
});
|
||||
|
||||
Route::get('/auth/login', 'AuthController@showLogin')->before('guest');
|
||||
Route::post('/auth/login', 'AuthController@postLogin')->before('guest|csrf');
|
||||
|
||||
Route::group(['before' => 'auth'], function() {
|
||||
// Dashboard/Management Panel etc.
|
||||
Route::get('/dashboard', 'DashboardController@showDashboard');
|
||||
|
||||
Reference in New Issue
Block a user