Download the PHP package ht3aa/link-to-relation-text-column without Composer
On this page you can find all versions of the php package ht3aa/link-to-relation-text-column. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ht3aa/link-to-relation-text-column
More information about ht3aa/link-to-relation-text-column
Files in ht3aa/link-to-relation-text-column
Package link-to-relation-text-column
Short Description A text column that provide a link to the view or edit page of column relation (the relation should have a filament resource with view or edit page)
License MIT
Homepage https://github.com/ht3aa/link-to-relation-text-column
Informations about the package link-to-relation-text-column
A text column that provide a link to the view or edit page of column relation (the relation should have a filament resource with view or edit page)
Installation
You can install the package via composer (for now only support filament v3):
Usage
The LinkToRelationTextColumn class extends Filament's TextColumn and automatically creates clickable links to the view or edit page of related models in your Filament tables.
Basic Usage
Import the class in your Filament resource:
Then use it in your table definition. The column will automatically detect the related model and find its corresponding Filament resource:
The column will:
- Automatically detect the related model (e.g.,
Userfrom theuserrelation) - Find the corresponding Filament resource for that model
- Create a link to the view page (if available) or edit page (if view is not available)
- Display an icon (arrow-top-right-on-square) when a link is available
Specifying a Resource Manually
If you need to explicitly specify which Filament resource to use, you can use the relationResource() method:
Example: Complete Table Definition
Credits
- Hasan Tahseen
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of link-to-relation-text-column with dependencies
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0