PHP code example of dluwang / auth

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

    

dluwang / auth example snippets


use Dluwang\Auth\Concerns\Assignable;

class User extends Authenticatable
{
    use Assignable;
}

$user->authorized('permissions');
$user->authorized(['permission-one', 'permission-two']);

$user->authorizedOneOf(['permission-one', 'permission-two']);

php artisan dluwang-auth:collect-permissions

php artisan vendor:publish