PHP code example of bageur / auth

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

    

bageur / auth example snippets


	'defaults' => [
	        'guard' 	=> 'api',
	        'passwords' => 'bgr_users',
	    ],

	'guards' => [
	        ..................
	        'api' => [
	             'driver' => 'jwt',
	             'provider' => 'bgr_users',
	        ],
	    ],
	'providers' => [
	        ..................     
	        'bgr_users' => [
	            'driver' => 'eloquent',
	            'model' => Bageur\Auth\Model\user::class,
	        ],
		],
	'passwords' => [
	        ..................     
	        'bgr_users' => [
            'provider' => 'bgr_users',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
	        ],
	    ],

	 protected $routeMiddleware = [
	 	.................. 
	 	'bgr.verify' => \App\Http\Middleware\BageurMiddleware::class,
	 ];

	 return [
	 	.................. 
	 	'paths' => ['api/*','bageur/*'],
	 ];

	Route::name('bageur.')->group(function () {
	Route::group(['prefix' => 'bageur/v1','middleware' => 'bgr.verify'], function () {
		
	});
});

'connections' => [
			.................. 
	'mysql' => [
				..................     
				'strict' => false,
				'engine' => null,
				'options' => extension_loaded('pdo_mysql') ? array_filter([
					PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
					PDO::ATTR_EMULATE_PREPARES => true
				]) : [],
			],
		],

'providers' => [
	..................
        Bageur\Auth\AuthServiceProvider::class,
        Bageur\Company\CompanyServiceProvider::class
    ],
'aliases' => [
		 'Bageur' => Bageur\Auth\Facades\BageurFacade::class
],
bash
 php artisan vendor:publish --tag=bageur-auth --force