developer
how to make tables compact
could we possibly make the tables a bit more compact? The row heights are quite large for just basic text, and it’s kind of limiting how many rows I can see on my desktop screen, I don't want all tables to be compact in case you thinking of applying global css values, but only some of them
6 replies
trying to test filament routes with pest
Im trying to implement this Pestphp smoke testing https://x.com/enunomaduro/status/1621203345036742656
but idk why it just dont work with filament routes
i get all routes from
php artisan route:list
but not even the single ->with(['/panel/login'])
work, what am i doing wrong?8 replies
Table selectColumn how to require confirmation
How to show a confirmation prompt when using https://filamentphp.com/docs/3.x/tables/columns/select
5 replies
same model policy: multiple resources
basically im using the same model in multiple resources, issue i have when using policies is that i can't find a way to get the resource is trying to access the policy to apply the correct filter...
i'm talking something like this: https://github.com/filamentphp/filament/discussions/7928#discussioncomment-6773578
13 replies
[bug] Resource infolist modal not working as expected
Encountered this little bug, where having an Infolist that needs to open in a modal from the
Tables\Actions\ViewAction::make()->slideOver()
stops working upon setting 'view' => Pages\ViewPost::route('/{record}')
in the getPages()
of the Resource (it opens as a full-page, not as a modal)
-------
The thing is, I need to have both functions active since I would like to be able to open a modal from the Resource itself and also be able to open the infolist in a separate full-page window
EDIT: if you want to reproduce this behavior just add the corresponding view or edit page to the getPages()
of your resource like this:
also add the ViewAction
action in the table()
method of the Resource like this:
When the view
page is present in the getPages()
the modal don't open as a modal but as full-page (at this point I'm just repeating myself sorry)
now you may wondering, why don't you just remove the view
page from the getPages()
then?...
because, issue is that by removing the view page, I'll consequently disable the view route, preventing access from other resources:
Route [filament.admin.resources.posts.view] not defined.
3 replies
Tabs: Mixing Tables and Forms
I need to create a page using tabs. One tab displays a table, while the other tabs display forms. each form uses different Eloquent models.
while reading the docs I notice that Tabs are specific for tables or forms:
forms: https://filamentphp.com/docs/3.x/forms/layout/tabs
tables: https://filamentphp.com/docs/3.x/panels/resources/listing-records#customizing-the-filter-tab-labels
5 replies
get query from ListRecords\Tab within Badge() to show the actual count() of filtered query
I'm talking about this: https://filamentphp.com/docs/3.x/panels/resources/listing-records#adding-badges-to-filter-tabs
in the example above, this could be quite useful for showing the number of records that pass that filter.
I'm using the method
modifyQueryUsing()
to filter the records for every Tab, but how can I access the query to apply the count() eloquent method to display number of records within the Badge()
method without manually writing the query again?6 replies
ImageColumn() set path
How can I set the image path when using ImageColumn() if in the database I only have the image's name stored, not the complete path? ... btw this is an existing laravel project which I'm trying to migrate to filament 🦒
7 replies
login with email and username
I'm trying to rebuild my current laravel app to filament v3, the existing app has the feature where user can login using both email or username and also other verifications
I'm kinda lost on how can I achieve this with filament
2 replies