Johan
Johan
FFilament
Created by Johan on 11/26/2024 in #❓┊help
Translatable Plugin - getLocaleLabelUsing
Am I missing something or should getLocaleLabelUsing return $this?
6 replies
FFilament
Created by Johan on 9/26/2023 in #❓┊help
Search field above Repeater or Key value field
I have a JSON field which I want to make searchable. Is this possible with for example the Repeater or Key value field? Or an alternative?
2 replies
FFilament
Created by Johan on 9/25/2023 in #❓┊help
Throw validation (exception) from action
Can I throw an validation error / exception from an action and show it in the form?
12 replies
FFilament
Created by Johan on 9/21/2023 in #❓┊help
assertPageActionHidden testing helper gone?
Is the assertPageActionHidden testing helper gone?
4 replies
FFilament
Created by Johan on 9/21/2023 in #❓┊help
formatStateUsing not called if value is null
Tables\Columns\TextColumn::make('cancelled_at')
->label('Cancelled')
->formatStateUsing(fn (?string $state) => $state ? 'Yes' : 'No')
->colors([
'success' => static fn (?string $state): bool => empty($state),
'danger' => static fn (?string $state): bool => !empty($state),
]),
Tables\Columns\TextColumn::make('cancelled_at')
->label('Cancelled')
->formatStateUsing(fn (?string $state) => $state ? 'Yes' : 'No')
->colors([
'success' => static fn (?string $state): bool => empty($state),
'danger' => static fn (?string $state): bool => !empty($state),
]),
This does echo "Yes" but if cancelled_at is null it wont show "No".
10 replies
FFilament
Created by Johan on 5/14/2023 in #❓┊help
Form Select component select all options method
Is there a way to add "Select all" to a Form Select component?
4 replies
FFilament
Created by Johan on 4/8/2023 in #❓┊help
Resource for a single user
How would you define a resource which is only accessible for a single user? That user can only see (and access) that resource and no others. I feel like adding policies to all is a bit cumbersome. So I thought there might be an easier solution.
7 replies
FFilament
Created by Johan on 3/15/2023 in #❓┊help
Using existing Resource for the relation manager of another resource
Can I reuse a complete resource for the relation manager within another resource? So I don't have to define everything again?
15 replies
FFilament
Created by Johan on 3/14/2023 in #❓┊help
Link table column to relation
Is there an easier way of linking a table column to the relation page? Or is this the way?
Tables\Columns\TextColumn::make('entity.name')
->searchable()
->url(fn (User $record): ?string => $record->entity ? EntityResource::getUrl('edit', ['record' => $record->entity]) : null),
Tables\Columns\TextColumn::make('entity.name')
->searchable()
->url(fn (User $record): ?string => $record->entity ? EntityResource::getUrl('edit', ['record' => $record->entity]) : null),
10 replies