1. Go to this page and download the library: Download ackosoft/auth-adapter 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/ */
// Enable Facades
$app->withFacades();
// Enable Eloquent
$app->withEloquent();
$app->register(Laravel\Passport\PassportServiceProvider::class);
$app->register(\Ackosoft\AuthAdapter\AppServiceProvider::class);
$app->routeMiddleware([
'auth' => \Ackosoft\AuthAdapter\Middleware\AuthMiddleware::class,
]);
$app->configure('auth'); //Add this line if not working properly
class User extends Model implements AuthenticatableContract, AuthorizableContract
{
use HasApiTokens, Authenticatable, Authorizable;
/* rest of the model */
}
protected $connection = 'mysql2';
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.