reppair
reppair
FFilament
Created by reppair on 10/30/2024 in #❓┊help
Filament Notifications and `wire:navigate`
I've spent some more time on this experimenting... no luck
2 replies
FFilament
Created by reppair on 10/31/2024 in #❓┊help
Component with actions in a loop?
I mean, I am planning on having infinite scroll and a feed of articles 🙂That is a lot of repletion, can I avoid that by using a single <x-filament-actions::modals /> somehow?
2 replies
FFilament
Created by reppair on 4/10/2024 in #❓┊help
Newbie question about reusing filters
Just for reference if someone is looking for it in the future, here is the refactored version of the above class which works fine too but is indeed more elegant.
<?php

namespace App\Filament\Resources\Shared\Filters;

use Filament\Tables\Filters\Filter;
use Illuminate\Database\Eloquent\Builder;

class UpcomingFilter extends Filter
{
public static function getDefaultName(): ?string
{
return 'upcoming';
}

protected function setUp(): void
{
parent::setUp();

$this->translateLabel('Upcoming')
->query(fn (Builder $query): Builder => $query->where('published_at', '>', now()))
->toggle();
}
}
<?php

namespace App\Filament\Resources\Shared\Filters;

use Filament\Tables\Filters\Filter;
use Illuminate\Database\Eloquent\Builder;

class UpcomingFilter extends Filter
{
public static function getDefaultName(): ?string
{
return 'upcoming';
}

protected function setUp(): void
{
parent::setUp();

$this->translateLabel('Upcoming')
->query(fn (Builder $query): Builder => $query->where('published_at', '>', now()))
->toggle();
}
}
5 replies