Skip to content

Commit

Permalink
Update GenesisPreset.php
Browse files Browse the repository at this point in the history
Updating the middleware that's added to be added to the bootstrap/app.php file instead of the kernel.
  • Loading branch information
tnylea authored Mar 12, 2024
1 parent 9cf7af0 commit 73c4fd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GenesisPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public static function install($stubDirectoryType = 'functional')

$filesystem->copyDirectory(__DIR__ . "/../stubs/{$stubDirectory}", base_path());

static::updateFile(base_path('app/Http/Kernel.php'), function ($file) {
static::updateFile(base_path('bootstrap/app.php'), function ($file) {
return str_replace(
"'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,",
"'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,\n\t\t'redirect-to-dashboard' => \App\Http\Middleware\RedirectToDashboard::class,",
"->withMiddleware(function (Middleware \$middleware) {",
"->withMiddleware(function (Middleware \$middleware) {\n\t\t\$middleware->alias([\n\t\t\t'redirect-to-dashboard' => \App\Http\Middleware\RedirectToDashboard::class\n\t\t]);",
$file
);
});
Expand Down

0 comments on commit 73c4fd5

Please sign in to comment.