PHP code example of mohamed-elsayed-ibrahim / filament-lockscreen

1. Go to this page and download the library: Download mohamed-elsayed-ibrahim/filament-lockscreen library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mohamed-elsayed-ibrahim / filament-lockscreen example snippets


return [

    /*
    |--------------------------------------------------------------------------
    | Enable / Disable Plugin
    |--------------------------------------------------------------------------
    */

    'enabled' => true,

    /*
    |--------------------------------------------------------------------------
    | Session Timeout (seconds)
    |--------------------------------------------------------------------------
    */

    'timeout' => env('FILAMENT_LOCK_TIMEOUT', 900),

    /*
    |--------------------------------------------------------------------------
    | Authentication Guard
    |--------------------------------------------------------------------------
    */

    'guard' => 'web',

    /*
    |--------------------------------------------------------------------------
    | Require Password Verification
    |--------------------------------------------------------------------------
    */

    'password_check' => true,

];

use MohamedElsayedIbrahim\FilamentLockScreen\FilamentLockScreenPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentLockScreenPlugin::make(),
        ]);
}

Hash::check(
    $password,
    auth()->user()->password
);

use MohamedElsayedIbrahim\FilamentLockScreen\Events\Locked;

Event::listen(Locked::class, function (Locked $event) {
    logger()->info(
        'User locked',
        ['user_id' => $event->user->id]
    );
});

use MohamedElsayedIbrahim\FilamentLockScreen\Events\Unlocked;

Event::listen(Unlocked::class, function (Unlocked $event) {
    logger()->info(
        'User unlocked',
        ['user_id' => $event->user->id]
    );
});
bash
php artisan vendor:publish --tag=filament-lock-screen-config
text
config/filament-lock-screen.php
bash
php artisan vendor:publish --tag=filament-lock-screen-views
text
src/
├── Contracts/
├── Events/
├── Http/
│   └── Middleware/
├── Livewire/
├── FilamentLockScreenPlugin.php
└── FilamentLockScreenServiceProvider.php