Troner
Troner
FFilament
Created by Troner on 6/7/2024 in #❓┊help
->hidden() on TextColumn not working with $record parameter
I am just trying to pass the $record variable to the ->hidden() method on my TextColumn (for my table in EntryResource.php) like the code below but it returns null.
TextColumn::make('is_public')
->hidden(fn ($record) => dd($record)), // returns null
TextColumn::make('is_public')
->hidden(fn ($record) => dd($record)), // returns null
then I tried using ->formatStateUsing() with $record for testing purpose and it is returning the record.
TextColumn::make('is_public')
->formatStateUsing(fn ($record) => dd($record)), // return the record
TextColumn::make('is_public')
->formatStateUsing(fn ($record) => dd($record)), // return the record
Why I can use $record on ->formatStateUsing() but not on ->hidden()? (Filament v3.2.86)
6 replies
FFilament
Created by Troner on 4/20/2024 in #❓┊help
My custom filament page is showing the wrong sidebar from different panel
Issue: When i'm on my custom filament page it's showing the wrong sidebar from the AdminPanel even when there is no /admin in the URL. What i tried: When i use ->default() on the UserPanelProvider instead the AdminPanelProvider it works but causing other errors in my app. i also removed /resources/views/vendor; upgraded filament and cleared cache. What i want: it should display the correct sidebar with the current settings below or do i really need to use ->default() on the UserPanelProvider and if yes why?
// UserPanelProvider
return $panel
// ->default()
->id('user')
->path('')
// UserPanelProvider
return $panel
// ->default()
->id('user')
->path('')
// AdminPanelProvider
return $panel
->default()
->id('admin')
->path('admin')
// AdminPanelProvider
return $panel
->default()
->id('admin')
->path('admin')
9 replies
FFilament
Created by Troner on 2/21/2024 in #❓┊help
getTabs() on custom page?
Can i use getTabs() (https://filamentphp.com/docs/3.x/panels/resources/listing-records#using-tabs-to-filter-the-records) on my custom filament page that contains a table?
6 replies
FFilament
Created by Troner on 10/13/2023 in #❓┊help
How to hide a custom page in menu bar?
How to hide a custom page in the menu/sidebar without removing it from the panel provider?
5 replies
FFilament
Created by Troner on 10/13/2023 in #❓┊help
Custom Page with URL parameters
I made a custom page with artisan make:filament-page but how to allow parameters like in web/routes.php where you can have somehing like this /example/{$id}. Also my page is not linked to any resource. I tried to add protected static ?string $slug = '/example/{$id}'; to my page class but then I get 404 error.
5 replies
FFilament
Created by Troner on 8/19/2023 in #❓┊help
custom primary id breaks URL's
2 replies