PHP code example of cboxdk / laravel-id-spatie
1. Go to this page and download the library: Download cboxdk/laravel-id-spatie 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/ */
cboxdk / laravel-id-spatie example snippets
// config/cbox-id.php
'access_control' => ['driver' => 'external'],
// config/id-spatie.php (php artisan vendor:publish --tag=id-spatie-config)
'user_model' => App\Models\User::class,
'teams' => false, // true to scope roles per organization via Spatie teams
'guard' => 'web',
use Cbox\Id\Spatie\Contracts\SpatieSubject;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable implements SpatieSubject
{
use HasRoles;
}