Skip to content

Commit

Permalink
write special env variables at the very end of the installer (e.g. SE…
Browse files Browse the repository at this point in the history
…SSION_DRIVER)
  • Loading branch information
Boy132 committed Nov 1, 2024
1 parent 382dcb3 commit 7bb86f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/Filament/Pages/Installer/PanelInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public function submit(): Redirector|RedirectResponse
$this->user ??= User::all()->filter(fn ($user) => $user->isRootAdmin())->first();
auth()->guard()->login($this->user, true);

// Special handling for special env variables (looking at you, SESSION_DRIVER)
$this->writeToEnv('env_special');

// Redirect to admin panel
return redirect(Dashboard::getUrl());
}
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Pages/Installer/Steps/EnvironmentStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function make(PanelInstaller $installer): Step
->inline()
->options(self::CACHE_DRIVERS)
->default(config('cache.default', 'file')),
ToggleButtons::make('env_general.SESSION_DRIVER')
ToggleButtons::make('env_special.SESSION_DRIVER')
->label('Session Driver')
->hintIcon('tabler-question-mark')
->hintIconTooltip('The driver used for storing sessions. We recommend "Filesystem" or "Database".')
Expand Down

0 comments on commit 7bb86f2

Please sign in to comment.