PHP code example of filament / spatie-laravel-tags-plugin
1. Go to this page and download the library: Download filament/spatie-laravel-tags-plugin 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/ */
filament / spatie-laravel-tags-plugin example snippets
use Filament\Forms\Components\SpatieTagsInput;
SpatieTagsInput::make('tags')
use Filament\Forms\Components\SpatieTagsInput;
SpatieTagsInput::make('tags')
->type('categories')
$user->attachTag('admin', type: 'role');
// Later, in an authorisation check:
if ($user->hasTag('admin', 'role')) {
// ...
}