PHP code example of jamesmills / laravel-admin
1. Go to this page and download the library: Download jamesmills/laravel-admin 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/ */
jamesmills / laravel-admin example snippets
// Check role anywhere
if (auth()->check() && auth()->user()->hasRole('admin')) {
// Do admin stuff here
}
if ($user->can('permission-name')) {
// Do something
}
php artisan laravel-admin:install