billyma121182
billyma121182
FFilament
Created by billyma121182 on 4/10/2025 in #❓┊help
SelectFilter ordering
I am trying to order a select field options from a table in decending ID but can't see any way to do that in the docs. Existing code below. Thanks in advance for any tips.
SelectFilter::make('ItemProjectID')
->relationship('project', 'ProjectName')
->getOptionLabelFromRecordUsing(fn($record) => $record->NameAndID)
->label('Project'),
SelectFilter::make('ItemProjectID')
->relationship('project', 'ProjectName')
->getOptionLabelFromRecordUsing(fn($record) => $record->NameAndID)
->label('Project'),
3 replies
FFilament
Created by billyma121182 on 3/7/2025 in #❓┊help
Odd issue with form select on virtual column
So I have a virtual column in my orders model defined as below: protected function TitleAndID(): Attribute { return Attribute::make( get: fn() => $this->OrderID . ' - ' . $this->OrderTitle, ); } I can access it fine in the in form select shown below Forms\Components\Select::make('DetailOrderID')->label('Order full') ->options(Order::all()->pluck('TitleAndID', 'OrderID')) ->preload() ->live() ->searchable() If I try to filter the options then access the TitleAndID column as below I get an error "Unknown column 'TitleAndID' in field list". What am I missing? Forms\Components\Select::make('DetailOrderID') ->label('Order') ->options(fn (Get $get): Collection => Order::query() ->where('OrderProjectID', $get('item.ItemProjectID')) ->pluck('TitleAndID', 'OrderID')),
10 replies
FFilament
Created by billyma121182 on 2/26/2025 in #❓┊help
I am trying to implement the csv export but file not created.
No description
7 replies
FFilament
Created by billyma121182 on 2/7/2025 in #❓┊help
Concating Fields in Select Option
I need to add the Project Name and IDs to select options. I have used a mutator in the model shown below. protected function NameAndID(): Attribute { return Attribute::make( get: fn() => $this->ProjectID . ' - ' . $this->ProjectName, ); } The NameAndID column works great in the form but not the filters where SelectFilter::make('PaymentProjectID')->relationship('project', 'NameAndID')->label('Project'), Gives me Column not found: 1054 Unknown column 'project.NameAndID' in 'field list' Any advise gratefully received!
9 replies
FFilament
Created by billyma121182 on 2/5/2025 in #❓┊help
Infolist link not clickable
I have added a link to an infolist using the code from the documentation and it there are no errors its just not creating a clickable link. Sure I'm jusrt being dumb but cant see why... Thanks anybody! TextEntry::make('Add Item') ->url(fn (Order $record): string => route('createItem', ['id' => $record])),
5 replies