shahzad
shahzad
Explore posts from servers
TLCTuto's Laravel Corner
Created by shahzad on 2/13/2024 in #💡filament
Disable pagination when filters are applied.
I'm using different filters but I want to remove the pagination once a filter is applied, is it doable within the filters context?
5 replies
FFilament
Created by shahzad on 2/13/2024 in #❓┊help
Disable pagination when filters are applied.
I'm using different filter but I want to remove the pagination once a filter is applied, is it doable within the filters context?
2 replies
FFilament
Created by shahzad on 1/19/2024 in #❓┊help
Display confirmation modal after state updated
Hey everyone, I'm trying to implement confirmation modal functionality when form input state changes like:
Flatpickr::make('time')
->animate()
->time()
->live()
->required()
->visible(fn (Get $get) => $get('date') !== null)
->afterStateUpdated(function (Get $get, Set $set, ?string $old, ?string $state) {
if (Artist::find($get('../../artist_id'))->isSlotReserved($get('date'), $state)) {
Notification::make()
->title('This slot is not available!')
->danger()
->seconds(5)
->send();
}
})
Flatpickr::make('time')
->animate()
->time()
->live()
->required()
->visible(fn (Get $get) => $get('date') !== null)
->afterStateUpdated(function (Get $get, Set $set, ?string $old, ?string $state) {
if (Artist::find($get('../../artist_id'))->isSlotReserved($get('date'), $state)) {
Notification::make()
->title('This slot is not available!')
->danger()
->seconds(5)
->send();
}
})
Instead of a simple notification I want to show the confirmation modal to user to verify if he wants to continue with duplicate entry. Is it possible? Thank you for your help!
2 replies
FFilament
Created by shahzad on 1/5/2024 in #❓┊help
Sortable is not working on Relation Manager class:
I'm facing a weird bug that sortable is not working on the relationship manager class. I have added the code below:

Tables\Columns\TextColumn::make('customer.name')
->searchable()
->sortable(),

Tables\Columns\TextColumn::make('customer.name')
->searchable()
->sortable(),
I'm using default search as well but I even tried removing that but still, it was not working. I need help to make it work. Appreciate your help!
7 replies