Download the PHP package manojkiran/filament-quick-view without Composer
On this page you can find all versions of the php package manojkiran/filament-quick-view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download manojkiran/filament-quick-view
More information about manojkiran/filament-quick-view
Files in manojkiran/filament-quick-view
Package filament-quick-view
Short Description Quick view slide-overs for related records in Filament tables and infolists.
License MIT
Informations about the package filament-quick-view
Filament Quick View
Show a related record in a slide-over, straight from a table column or an infolist entry, without leaving the page.
The value looks like a link with an eye icon. A click opens a slide-over with a few titled groups of labelled values, and a button opens the record's own page.
Requirements
- PHP 8.3+
- Laravel 12 or 13
- Filament 5
Installation
The service provider is auto-discovered.
Usage
QuickViewColumn extends Filament's TextColumn and QuickViewEntry extends TextEntry, so every method you already know still works. Point them at the resource of the related record:
What is shown in the column
The relationship comes from the column name, so Filament already reads the value for you:
| Column name | Shown | Related record |
|---|---|---|
server.hostname |
the server's hostname |
server relationship |
server |
the server's record title ($recordTitleAttribute of the resource) |
server relationship |
With the second form there is no need for getStateUsing():
If the name has no relationship in it, pass one: QuickViewColumn::make('hostname')->quickView(ServerResource::class, 'server'), or find the record yourself with ->quickViewRecord(fn ($record) => ...). Call ->state() after quickView() to show something else.
What opens in the slide-over
The click opens a slide-over (a normal Filament Action) with an "Open full page" button to the resource's view page. It is only available when the user may canView the related record.
By default the content is the infolist of the resource. ->quickView(ServerResource::class) renders ServerResource::infolist(), the same method Filament uses for the resource's View page, bound to the related record. There is nothing to define twice.
This needs the infolist to be defined on the resource (public static function infolist(Schema $schema): Schema). If your resource doesn't define one, or builds it inside its ViewRecord page, the slide-over is empty: pass ->infolist(...) as shown below.
Your own infolist
Pass a schema instead of using the resource's infolist. It is bound to the related record, so TextEntry::make('name') shows server.name:
The resource is optional when you give an infolist. Without it there is no "Open full page" button, and the link is hidden when the model has a policy that denies view. Add ->quickView(ServerResource::class) to get the button and the resource's canView check.
Customising the slide-over
Texts are translatable: php artisan vendor:publish --tag=filament-quick-view-translations.
Testing
In your own tests, QuickViewRegistry::forget(Server::class) removes a registration.
License
MIT