Skip to content

Latest commit

 

History

History
96 lines (71 loc) · 2.74 KB

README.md

File metadata and controls

96 lines (71 loc) · 2.74 KB

Give an ability to the user to lock their access without logging out of the system for a break.

Latest Version on Packagist Total Downloads


🚨 For latest version that support FilamentPhp v2.x use this branch 1.x

Installation

You can install the package via composer:

composer require marjose123/filament-lockscreen:"^2.0"

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-lockscreen-views"

Add the plugin to your panel and add the middleware Locker::class to your panel and you're ready to go

use lockscreen\FilamentLockscreen\Lockscreen;
use lockscreen\FilamentLockscreen\Http\Middleware\Locker;
use lockscreen\FilamentLockscreen\Http\Middleware\LockerTimer;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(new Lockscreen());  // <- Add this

         ->middleware([
              //
              LockerTimer::class, // <- Add this (this is an optional, if you want to lock the request after 30 minutes idle)
          ])
         ->authMiddleware([
                // ...
                 Locker::class, // <- Add this
            ]);
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

If you want to contribute to Filament-lockerscreen packages, you may want to test it in a real Laravel project:

  • Fork this repository to your GitHub account.
  • Create a Laravel app locally.
  • Clone your fork in your Laravel app's root directory.
  • In the /filament-lockscreen directory, create a branch for your fix, e.g. fix/error-message.

Install the packages in your app's composer.json:

{
   // ...
    "require": {
        "marjose123/filament-lockscreen": "*",
    },
    "repositories": [
        {
            "type": "path",
            "url": "filament-lockscreen"
        }
    ],
   // ...
}

Now, run composer update.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.