generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
108 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
return [ | ||
|
||
|
||
/* | ||
* Lock Screen Icon | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?php | ||
|
||
return [ | ||
'heading' => 'قوفڵی شاشه', | ||
'user_menu_title' => 'قوفڵی شاشه', | ||
'fields' => [ | ||
'password' => 'وشەی نهێنی', | ||
], | ||
'button' => [ | ||
'switch_account' => 'گۆرینی هەژمار', | ||
'submit_label' => 'چوونە ژوورەوە', | ||
], | ||
'notification' => [ | ||
'title' => 'شکستی چوونەژوورەوە', | ||
'message' => 'دوای شکستی چوونەژوورەوەی سەرکەوتوو ئاڕاستەکرایتەوە بۆ لاپەڕەی چوونەژوورەوە.', | ||
], | ||
]; | ||
<?php | ||
|
||
return [ | ||
'heading' => 'قوفڵی شاشه', | ||
'user_menu_title' => 'قوفڵی شاشه', | ||
'fields' => [ | ||
'password' => 'وشەی نهێنی', | ||
], | ||
'button' => [ | ||
'switch_account' => 'گۆرینی هەژمار', | ||
'submit_label' => 'چوونە ژوورەوە', | ||
], | ||
'notification' => [ | ||
'title' => 'شکستی چوونەژوورەوە', | ||
'message' => 'دوای شکستی چوونەژوورەوەی سەرکەوتوو ئاڕاستەکرایتەوە بۆ لاپەڕەی چوونەژوورەوە.', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?php | ||
|
||
return [ | ||
'heading' => 'قوفڵی شاشه', | ||
'user_menu_title' => 'قوفڵی شاشه', | ||
'fields' => [ | ||
'password' => 'وشەی نهێنی', | ||
], | ||
'button' => [ | ||
'switch_account' => 'گۆرینی هەژمار', | ||
'submit_label' => 'چوونە ژوورەوە', | ||
], | ||
'notification' => [ | ||
'title' => 'شکستی چوونەژوورەوە', | ||
'message' => 'دوای شکستی چوونەژوورەوەی سەرکەوتوو ئاڕاستەکرایتەوە بۆ لاپەڕەی چوونەژوورەوە.', | ||
], | ||
]; | ||
<?php | ||
|
||
return [ | ||
'heading' => 'قوفڵی شاشه', | ||
'user_menu_title' => 'قوفڵی شاشه', | ||
'fields' => [ | ||
'password' => 'وشەی نهێنی', | ||
], | ||
'button' => [ | ||
'switch_account' => 'گۆرینی هەژمار', | ||
'submit_label' => 'چوونە ژوورەوە', | ||
], | ||
'notification' => [ | ||
'title' => 'شکستی چوونەژوورەوە', | ||
'message' => 'دوای شکستی چوونەژوورەوەی سەرکەوتوو ئاڕاستەکرایتەوە بۆ لاپەڕەی چوونەژوورەوە.', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace lockscreen\FilamentLockscreen\Http; | ||
|
||
use Filament\Facades\Filament; | ||
use Illuminate\Http\RedirectResponse; | ||
|
||
class LockscreenSessionController | ||
{ | ||
/** | ||
* @throws \Exception | ||
*/ | ||
public function lockSession(): RedirectResponse | ||
{ | ||
$currentPanel = filament()->getCurrentPanel(); | ||
/** | ||
* Check if the request is still authenticated or not before rendering the page, | ||
* if not authenticated then redirect to the login page of current panel, or default panel if current panel could not be detected. | ||
*/ | ||
if (! Filament::auth()->check()) { | ||
if (filament()->getCurrentPanel()) { | ||
return redirect(filament()->getCurrentPanel()->getLoginUrl()); | ||
} | ||
|
||
return redirect(filament()->getDefaultPanel()->getLoginUrl()); | ||
} | ||
|
||
session(['lockscreen' => true]); | ||
|
||
return redirect()->route("lockscreen.{$currentPanel->getId()}.page"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.