PHP code example of worden / shaka-auth-for-laravel
1. Go to this page and download the library: Download worden/shaka-auth-for-laravel 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/ */
worden / shaka-auth-for-laravel example snippets
bash
'shakaAuth' => \Cty\ShakaAuth\Middleware\ShakaAuth::class,
bash
$role = Role::where('id',25)->first();
$res2 = $role->attachPermission(17);
$res2 = $role->detachPermission([18]);
$res2 = $role->userList();
$res2 = $role->hasPermission(['manage_posts2','manage_posts3']);
$res2 = $role->permissionList();
$res2 = $role->basePermission()->menu();