PHP code example of astral-php / astral-auth-extra

1. Go to this page and download the library: Download astral-php/astral-auth-extra 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/ */

    

astral-php / astral-auth-extra example snippets


use Astral\AuthExtra\AuthExtraServiceProvider;

return [
    // …
    AuthExtraServiceProvider::class,
];

'auth_extra' => [
    'max_attempts'    => 5,
    'decay_seconds'   => 900,   // 15 min
    'remember_days'   => 30,
    'log_to_database' => false, // true → table login_attempts
],
bash
composer 
bash
php bin/console migrate