Skip to content

Commit

Permalink
ability to change lock screen url (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarJose123 committed Jun 5, 2023
2 parents c75602c + 0e14c7f commit f1ddffa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ return [
*/
'icon' => 'heroicon-s-lock-closed',

/*
* Lock Screen URL
*
* Note: do not provide base url `/` or empty, otherwise it will return default url
*/
'url' => '/screen/lock',

/*
| ------------------------------------------------------------------------------------------------
| Table Column Name
Expand Down
7 changes: 7 additions & 0 deletions config/filament-lockscreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
*/
'icon' => 'heroicon-s-lock-closed',

/*
* Lock Screen URL
*
* Note: do not provide base url `/` or empty, otherwise it will return default url
*/
'url' => '/screen/lock',

/*
| ------------------------------------------------------------------------------------------------
| Table Column Name
Expand Down
7 changes: 6 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
->middleware(config('filament.middleware.base'))
->prefix(config('filament.path'))
->group(function () {
Route::get('/screen/lock', LockerScreen::class)->name('lockscreenpage')->middleware(['auth']);
Route::get(
(config()->has('filament-lockscreen.url') && config('filament-lockscreen.url') != '' && config('filament-lockscreen.url') != '/')
? config('filament-lockscreen.url')
: '/screen/lock',
LockerScreen::class
)->name('lockscreenpage')->middleware(['auth']);
});

0 comments on commit f1ddffa

Please sign in to comment.