billyma121182
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
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