cleaniquecoders / laravel-expiry
Enable expiry on user's account and user's password.
Requires
- php: ^8.1 | ^8,2 | ^8.3
- doctrine/dbal: ^3.0
- illuminate/auth: ^9.0 | ^10.0 | ^11.0
- illuminate/support: ^9.0 | ^10.0 | ^11.0
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
This package is auto-updated.
Last update: 2024-10-08 08:23:42 UTC
README
Laravel Expiry
Enable expiry on user's account and user's password.
Installation
In order to install cleaniquecoders/laravel-expiry
in your Laravel project, just run the composer require command from your terminal:
composer require cleaniquecoders/laravel-expiry
Then publish and run the migration files:
php artisan vendor:publish --tag=laravel-expiry-migrations php artisan migrate
Register route middlewares in app/Http/Kernel.php
:
'account.expiry' => \CleaniqueCoders\LaravelExpiry\Http\Middleware\AccountExpiry::class, 'password.expiry' => \CleaniqueCoders\LaravelExpiry\Http\Middleware\PasswordExpiry::class,
Usage
Now you may use the middleware in your application:
Route::middleware(['account.expiry', 'password.expiry']) ->get('/somewhere-not-expired');
You can listen to the following events on account and password expiry:
use CleaniqueCoders\LaravelExpiry\Events\ExpiredAccount; use CleaniqueCoders\LaravelExpiry\Events\ExpiredPassword;
Test
Run the following command:
vendor/bin/phpunit --testdox --verbose
Contributing
Thank you for considering contributing to the cleaniquecoders/laravel-expiry
!
Bug Reports
To encourage active collaboration, it is strongly encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing a failing test.
However, if you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.
Coding Style
cleaniquecoders/laravel-expiry
follows the PSR-2 coding standard and the PSR-4 autoloading standard.
License
This package is open-sourced software licensed under the MIT license.