Download the PHP package phpinnacle/tags without Composer
On this page you can find all versions of the php package phpinnacle/tags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpinnacle/tags
More information about phpinnacle/tags
Files in phpinnacle/tags
Package tags
Short Description Polymorphic record tagging and management for Laravel Filament applications.
License MIT
Homepage https://github.com/phpinnacle/tags
Informations about the package tags
Tags for Filament
Tags adds reusable, polymorphic tagging to Eloquent records and provides the Filament components needed to edit, display, filter and bulk-assign tags.
Features
- Central
Tagmodel with polymorphic record assignments. - Filament
TagsInputform field. TagsColumnfor table display.TagsFilterfor narrowing table records.TagsBulkActionfor assigning tags to multiple records.- Policy-backed tag management, custom connection and optional tenancy.
Installation
Register TagsPlugin::make() in the target Filament panel. Publish phpinnacle-tags-config when using a non-default database connection or tenant model.
Filament usage
The filter uses the table model's morph class to load available tags, including any registered morph alias. Use TagsFilter::make()->model($type) to explicitly select the type stored in tags.type.
The tagged model must expose the relationship expected by these components. Follow the relation naming and morph contract used by Tag and the package migration when integrating an existing model. Authorization for tag records is handled by TagPolicy.
Tag definitions and assignments use phpinnacle-tags.connection, including bulk transactions and reads/removals. Tagged models may live on another connection: bulk assignment checks selected IDs on their source connection and writes only to the tag database. Deleted source records are skipped, repeat assignment is idempotent, and a failed bulk operation rolls back its tag definitions and assignments together.
Testing
To exercise tag writes on PostgreSQL while source records remain on another connection, use a dedicated test database:
Changelog and license
See MIT License.