PHP code example of upbond / laravel-auth

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

    

upbond / laravel-auth example snippets


// app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Cache;
// ...
    public function register()
    {
        // ...
        $this->app->bind(
            '\Auth\SDK\Helpers\Cache\CacheHandler',
            function() {
                static $cacheWrapper = null;
                if ($cacheWrapper === null) {
                $cache = Cache::store();
                $cacheWrapper = new LaravelCacheWrapper($cache);
            }
            return $cacheWrapper;
        });
    }

$this->app->bind(
    \Upbond\Auth\Login\Contract\AuthUserRepository::class,
    \Upbond\Auth\Login\Repository\AuthUserRepository::class
);

$app->register(Upbond\Auth\Login\LoginServiceProvider::class);