PHP code example of jeffersongoncalves / filament-teams
1. Go to this page and download the library: Download jeffersongoncalves/filament-teams 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/ */
jeffersongoncalves / filament-teams example snippets
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasDefaultTenant;
use Filament\Models\Contracts\HasTenants;
use Illuminate\Foundation\Auth\User as Authenticatable;
use JeffersonGoncalves\Filament\Teams\Concerns\HasTeamsFilament;
class User extends Authenticatable implements FilamentUser, HasDefaultTenant, HasTenants
{
use HasTeamsFilament;
}
use JeffersonGoncalves\Filament\Teams\FilamentTeamsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentTeamsPlugin::make()
->tenancy() // enable tenant config (default: true)
->invitations() // register the invitation acceptance page (default: true)
->resources() // register the Teams & Team Invitations admin resources (default: false)
->tenantRoutePrefix('team'),
]);
}