PHP code example of smashed-egg / laravel-in-memory-auth

1. Go to this page and download the library: Download smashed-egg/laravel-in-memory-auth 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/ */

    

smashed-egg / laravel-in-memory-auth example snippets


'driver' => 'memory',

'memory' => [
    'driver' => 'memory',
    'model' => \SmashedEgg\LaravelInMemoryAuth\User::class,
    'username_field' => 'email',
    'users' => [

        /*
         '[email protected]' => [
            'id' => 1,
            'name' => 'My name',
            // Hashed password using the hasher service
            'password' => 'hashed_password',
        ],
         */

        '[email protected]' => [
            'id' => 1,
            'email' => '[email protected]',
            'name' => 'Barry Allen'
            // Hashed password using the hasher service
            'password' => '$2y$10$Mfusxb1546MFxQ4A1s4GE.OF/gFuI8Y6Hw9xnlZeiHtjDl0/pnXPK',
            'remember_token' => '',
        ],
    ],
],
shell
php artisan smashed-egg:hash:password mypassword