Simplify routes of setup

This commit is contained in:
Pig Fang 2019-05-03 07:50:56 +08:00
parent 403089157a
commit 6032297baa
2 changed files with 11 additions and 16 deletions

View File

@ -78,12 +78,9 @@ class RouteServiceProvider extends ServiceProvider
*/
protected function mapSetupRoutes(Router $router)
{
$router->group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/setup.php');
});
Route::prefix('setup')
->namespace($this->namespace)
->group(base_path('routes/setup.php'));
}
/**

View File

@ -14,14 +14,12 @@
/**
* Setup Wizard.
*/
Route::group(['prefix' => 'setup'], function () {
Route::group(['middleware' => 'setup'], function () {
Route::any('/', 'SetupController@welcome');
Route::any('/database', 'SetupController@database');
Route::get('/info', 'SetupController@info');
Route::post('/finish', 'SetupController@finish');
});
Route::get('/update', 'SetupController@update');
Route::post('/update', 'SetupController@doUpdate');
Route::group(['middleware' => 'setup'], function () {
Route::any('/', 'SetupController@welcome');
Route::any('/database', 'SetupController@database');
Route::get('/info', 'SetupController@info');
Route::post('/finish', 'SetupController@finish');
});
Route::get('/update', 'SetupController@update');
Route::post('/update', 'SetupController@doUpdate');