Kurja
Kurja
FFilament
Created by Kurja on 11/27/2023 in #❓┊help
using an accessor as the attribute in a selectFilter in table
Hi, is it possible to use accessor as filters in tables? I'm trying to use an accessor in a SelectFilter and I'm getting the following error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'publish_status' in 'where clause'
My code is the following $table->filters([ SelectFilter::make('status') ->label('Publish status') ->options([ 'published' => 'published', 'scheduled' => 'scheduled', 'draft' => 'draft', ]) ->attribute('publish_status'), ]) And the accesor in the model is the following public function publishStatus(): Attribute { return Attribute::make( get: function() { if ($this->published_at) { return 'published'; } if ($this->scheduled_at) { return 'scheduled'; } return 'draft'; }, ); } Any help appreciated, thanks in advance
5 replies
FFilament
Created by Kurja on 11/20/2023 in #❓┊help
Changing the base layout for panel
Hi, is there a way to change the base layout for the panel provider? I'm using both inertia and filament in my project and i need to disable livewire config "inject_assets" because it makes my inertia tests fail, but this makes the filament panel to not load the livewire scripts (this should be done manually using @livewireScripts, but the filament panel is apparently ignoring my app.blade.php layout in resources/views/components/layouts
4 replies
FFilament
Created by Kurja on 7/14/2023 in #❓┊help
How to create a global filter for a page
Hi, i need to create a page with various widgets that display data. For that page i need to define filters that applies to all the widgets, i did not find anything in the docs, is that achivable using filament?
4 replies