Skip to content

Commit

Permalink
Add Lock Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
afsakar committed May 23, 2023
1 parent 37d9f5f commit ec6c631
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Filament/Resources/RevenueResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function form(Form $form): Form
->options(\App\Models\Corporation::query()->get()->pluck('name', 'id'))
->afterStateUpdated(function ($state, Closure $set) {
$corporation = \App\Models\Corporation::query()->find($state);
$set('currency_id', $corporation->currency_id);
$corporation ? $set('currency_id', $corporation->currency_id) : null;
})
->searchable()
->placeholder('Select Corporation')
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"laravel/framework": "^10.8",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"livewire/livewire": "^2.12"
"livewire/livewire": "^2.12",
"marjose123/filament-lockscreen": "^1.1"
},
"require-dev": {
"doctrine/dbal": "^3.6",
Expand Down
150 changes: 149 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/filament.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use lockscreen\FilamentLockscreen\Http\Middleware\Locker;

return [

Expand Down Expand Up @@ -319,6 +320,7 @@
'middleware' => [
'auth' => [
Authenticate::class,
Locker::class
],
'base' => [
EncryptCookies::class,
Expand Down

0 comments on commit ec6c631

Please sign in to comment.