PHP code example of roundly-consulting / teams-for-laravel
1. Go to this page and download the library: Download roundly-consulting/teams-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/ */
roundly-consulting / teams-for-laravel example snippets
use RoundlyConsulting\Teams\Facades\Teams;
use RoundlyConsulting\Teams\Traits\HasTeams;
Teams::roles()->register('owner', 'Owner', ['*']);
Teams::roles()->register('editor', 'Editor', ['posts.edit', 'posts.publish']);
Teams::roles()->register('member', 'Member', ['posts.view']);
class User extends Authenticatable
{
use HasTeams;
}