Skip to content

Commit

Permalink
Adding updates to redirect to home after theme switch
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Oct 3, 2024
1 parent 677f888 commit 3eed453
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion wave/resources/views/install.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
@else

@php
\Illuminate\Support\Facades\File::put(database_path('database.sqlite'), '');
if (!\Illuminate\Support\Facades\File::exists(database_path('database.sqlite'))) {
\Illuminate\Support\Facades\File::put(database_path('database.sqlite'), '');
}
\Illuminate\Support\Facades\Artisan::call('migrate', [
'--force' => true
]);
Expand Down
2 changes: 1 addition & 1 deletion wave/src/Http/Middleware/ThemeDemoMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ThemeDemoMiddleware
public function handle($request, Closure $next)
{
if(isset($request->theme)){
return redirect()->back()->withCookie(cookie('theme', $request->theme, 60, null, null, false, false));
return redirect('/')->withCookie(cookie('theme', $request->theme, 60, null, null, false, false));
}

return $next($request);
Expand Down

0 comments on commit 3eed453

Please sign in to comment.