PHP code example of cleaniquecoders / laravel-expiry

1. Go to this page and download the library: Download cleaniquecoders/laravel-expiry 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/ */

    

cleaniquecoders / laravel-expiry example snippets


Route::middleware(['account.expiry', 'password.expiry'])->group(function () {
    Route::get('/protected-route', [SomeController::class, 'index']);
});

'events' => [
    \CleaniqueCoders\LaravelExpiry\Events\ExpiredAccount::class => [
        \CleaniqueCoders\LaravelExpiry\Listeners\LogoutOnExpired::class,
    ],
    \CleaniqueCoders\LaravelExpiry\Events\ExpiredPassword::class => [
        \CleaniqueCoders\LaravelExpiry\Listeners\LogoutOnExpired::class,
    ],
],

'events' => [
    \CleaniqueCoders\LaravelExpiry\Events\ExpiredAccount::class => [
        \App\Listeners\YourCustomListener::class,
    ],
    \CleaniqueCoders\LaravelExpiry\Events\ExpiredPassword::class => [
        \App\Listeners\YourCustomListener::class,
    ],
],
bash
php artisan vendor:publish --tag=laravel-expiry-migrations
php artisan migrate