1. Go to this page and download the library: Download waywake/auth-client 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/ */
waywake / auth-client example snippets
PdAuth\PdAuthServiceProvider::class
use PdAuth\Controller;
class UserController
{
use Controller;
public function __construct()
{
$this->auth('erp');
}
public function me()
{
return $this->user;
}
}
class OrderController
{
public const Privileges = [
'index' => ['admin', 'sales'],
'show' => '*',
];
}