urbycoz
urbycoz
FFilament
Created by urbycoz on 6/6/2024 in #❓┊help
How can I make my form action show a confirmation modal?
👆 This guy is a legend!
5 replies
FFilament
Created by urbycoz on 5/15/2024 in #❓┊help
Hide modal heading without hiding cross
Nice solution. Thanks
6 replies
FFilament
Created by urbycoz on 4/16/2024 in #❓┊help
Datatable pagination is showing "compact" version
Ok I've figured it out. It's just how the pagination behaves on smaller screens.
4 replies
FFilament
Created by urbycoz on 4/16/2024 in #❓┊help
Using limit with default in datatable textcolumn
Perfect. Thanks
5 replies
FFilament
Created by urbycoz on 4/16/2024 in #❓┊help
How can I show styled text if a cell is empty?
Thanks both. HtmlString was the key for me. TextColumn::make('description') ->label('Description') ->default(new HtmlString('<span class="px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full">Empty</span>'))
5 replies
FFilament
Created by urbycoz on 3/25/2024 in #❓┊help
How can I add a debounce to my autosaving form field?
Thanks that's exactly it.
5 replies
FFilament
Created by urbycoz on 3/17/2024 in #❓┊help
Can I change the default FileUpload Text?
No way it can be that easy.... ...yup it is! Thanks
6 replies
FFilament
Created by urbycoz on 1/18/2024 in #❓┊help
Searching in a table on a column using a polymorphic relationship
Well what do you know? Turns out it was the right approach after all.
TextColumn::make('contact.combinedName')
->searchable(query: function (Builder $query, string $search): Builder {
return $query->whereHasMorph(
'contact',
[Customer::class, Employee::class],
function ($query, $type) use ($search) {
if ($type === 'Customer') {
$query->where('cust_name', 'like', '%'.$search.'%');
} elseif ($type === 'Employee') {
$query->where('emp_name', 'like', '%'.$search.'%');
}
}
);
}
TextColumn::make('contact.combinedName')
->searchable(query: function (Builder $query, string $search): Builder {
return $query->whereHasMorph(
'contact',
[Customer::class, Employee::class],
function ($query, $type) use ($search) {
if ($type === 'Customer') {
$query->where('cust_name', 'like', '%'.$search.'%');
} elseif ($type === 'Employee') {
$query->where('emp_name', 'like', '%'.$search.'%');
}
}
);
}
6 replies
FFilament
Created by urbycoz on 1/18/2024 in #❓┊help
Searching in a table on a column using a polymorphic relationship
Thanks. I can't see any way to incorporate any of the methods or approaches there. I think my scenario is slightly different to the one they were designed for.
6 replies
FFilament
Created by urbycoz on 1/10/2024 in #❓┊help
How can I dynamically update my Select options based on an API
This is perfect. Thanks so much!
6 replies
FFilament
Created by urbycoz on 12/7/2023 in #❓┊help
Why doesn't my placeholder work on columns with relationships?
I've found a way round this. Add this to the TextEntry: ->getStateUsing(fn ($record) => $record->account->name ?? null)
4 replies
FFilament
Created by urbycoz on 12/6/2023 in #❓┊help
Why doesn't my filter badge update when I apply a filter?
I've finally got it working by using: ->indicateUsing(function (array $data): ?string { if (! $data['accountid']) { return null; } return 'Account ID: '.$data['accountid']; }) I don't really understand why this is required but hey.
12 replies
FFilament
Created by urbycoz on 12/6/2023 in #❓┊help
Why doesn't my filter badge update when I apply a filter?
Ok I'll try and do that. I've just been looking through the Filament source code. It seems the badge simply counts the number of filter indicators present and they don't appear when I apply my filter, even though the filtering itself seems to work ok.
12 replies
FFilament
Created by urbycoz on 12/6/2023 in #❓┊help
Why doesn't my filter badge update when I apply a filter?
Yeah I've made four similar tables with quite a number of columns - all text columns. All seem to have the same behaviour.
12 replies
FFilament
Created by urbycoz on 12/4/2023 in #❓┊help
Vertical table lines
Ok thanks. I'll do this: .fi-ta-cell { border-right:1px solid #E4E4E6; }
5 replies
FFilament
Created by urbycoz on 11/25/2023 in #❓┊help
How to set a default on a searchable Select
No, none.
7 replies
FFilament
Created by urbycoz on 11/25/2023 in #❓┊help
How to set a default on a searchable Select
It's the form builder. And I do already have $this->form->fill() in the mount method.
7 replies
FFilament
Created by urbycoz on 11/22/2023 in #❓┊help
How can I change the default behaviour for every instance of a particular component?
Perfect. Thank you
5 replies