diff --git a/src/Routes/web.php b/src/Routes/web.php index c4f012d..0615144 100755 --- a/src/Routes/web.php +++ b/src/Routes/web.php @@ -1,84 +1,44 @@ 'install', 'as' => 'LaravelInstaller::', 'namespace' => 'Smarteknoloji\SmartInstaller\Controllers', 'middleware' => ['web', 'install']], function () { - Route::get('/', [ - 'as' => 'welcome', - 'uses' => 'WelcomeController@welcome', - ]); - - Route::get('environment', [ - 'as' => 'environment', - 'uses' => 'EnvironmentController@environmentMenu', - ]); - - Route::get('environment/wizard', [ - 'as' => 'environmentWizard', - 'uses' => 'EnvironmentController@environmentWizard', - ]); - - Route::post('environment/saveWizard', [ - 'as' => 'environmentSaveWizard', - 'uses' => 'EnvironmentController@saveWizard', - ]); - - Route::get('environment/classic', [ - 'as' => 'environmentClassic', - 'uses' => 'EnvironmentController@environmentClassic', - ]); - - Route::post('environment/saveClassic', [ - 'as' => 'environmentSaveClassic', - 'uses' => 'EnvironmentController@saveClassic', - ]); - - Route::get('requirements', [ - 'as' => 'requirements', - 'uses' => 'RequirementsController@requirements', - ]); - - Route::get('permissions', [ - 'as' => 'permissions', - 'uses' => 'PermissionsController@permissions', - ]); - - Route::get('database/requirements', [ - 'as' => 'databaseRequirements', - 'uses' => 'DatabaseController@requirements', - ]); - - Route::get('database', [ - 'as' => 'database', - 'uses' => 'DatabaseController@database', - ]); - - Route::get('final', [ - 'as' => 'final', - 'uses' => 'FinalController@finish', - ]); -}); - -Route::group(['prefix' => 'update', 'as' => 'LaravelUpdater::', 'namespace' => 'Smarteknoloji\SmartInstaller\Controllers', 'middleware' => 'web'], function () { - Route::group(['middleware' => 'update'], function () { - Route::get('/', [ - 'as' => 'welcome', - 'uses' => 'UpdateController@welcome', - ]); - - Route::get('overview', [ - 'as' => 'overview', - 'uses' => 'UpdateController@overview', - ]); - - Route::get('database', [ - 'as' => 'database', - 'uses' => 'UpdateController@database', - ]); +use Illuminate\Support\Facades\Route; +use Smarteknoloji\SmartInstaller\Controllers\DatabaseController; +use Smarteknoloji\SmartInstaller\Controllers\EnvironmentController; +use Smarteknoloji\SmartInstaller\Controllers\FinalController; +use Smarteknoloji\SmartInstaller\Controllers\PermissionsController; +use Smarteknoloji\SmartInstaller\Controllers\RequirementsController; +use Smarteknoloji\SmartInstaller\Controllers\UpdateController; +use Smarteknoloji\SmartInstaller\Controllers\WelcomeController; + +Route::prefix('install') + ->as('LaravelInstaller::') + ->middleware(['web', 'install']) + ->group(function () { + Route::get('/', [WelcomeController::class, 'welcome'])->name('welcome'); + Route::get('environment', [EnvironmentController::class, 'environmentMenu'])->name('environment'); + Route::get('environment/wizard', [EnvironmentController::class, 'environmentWizard'])->name('environmentWizard'); + Route::post('environment/saveWizard', [EnvironmentController::class, 'saveWizard'])->name('saveWizard'); + Route::get('environment/classic', [EnvironmentController::class, 'environmentClassic'])->name('environmentClassic'); + Route::post('environment/saveClassic', [EnvironmentController::class, 'saveClassic'])->name('saveClassic'); + Route::get('requirements', [RequirementsController::class, 'requirements'])->name('requirements'); + Route::get('permissions', [PermissionsController::class, 'permissions'])->name('permissions'); + Route::get('database/requirements', [DatabaseController::class, 'requirements'])->name('databaseRequirements'); + Route::get('database', [DatabaseController::class, 'database'])->name('database'); + Route::get('final', [FinalController::class, 'finish'])->name('final'); }); - // This needs to be out of the middleware because right after the migration has been - // run, the middleware sends a 404. - Route::get('final', [ - 'as' => 'final', - 'uses' => 'UpdateController@finish', - ]); -}); +Route::prefix('update') + ->as('LaravelUpdater::') + ->middleware(['web']) + ->group(function () { + Route::controller(UpdateController::class) + ->middleware(['update']) + ->group(function () { + Route::get('/', 'welcome')->name('welcome'); + Route::get('overview', 'overview')->name('overview'); + Route::post('database', 'database')->name('database'); + }); + + // This needs to be out of the middleware because right after the migration has been + // run, the middleware sends a 404. + Route::get('final', [UpdateController::class, 'finish'])->name('final'); + }); diff --git a/src/Views/environment-classic.blade.php b/src/Views/environment-classic.blade.php index 6d7a7f0..8c46023 100644 --- a/src/Views/environment-classic.blade.php +++ b/src/Views/environment-classic.blade.php @@ -17,8 +17,7 @@ @endsection @section('container') - -
+ @csrf @@ -43,5 +42,4 @@ @endif
- @endsection \ No newline at end of file diff --git a/src/Views/environment-wizard.blade.php b/src/Views/environment-wizard.blade.php index 549bde5..391602c 100644 --- a/src/Views/environment-wizard.blade.php +++ b/src/Views/environment-wizard.blade.php @@ -26,7 +26,6 @@ @section('container')
- -
+
@@ -665,7 +664,6 @@
- @endsection