<?php
namespace App\Filament\Resources;
use App\Filament\Resources\ReminderResource\Pages;
use App\Models\Reminder;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Components\Tab;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;
class ReminderResource extends Resource
{
protected static ?string $model = Reminder::class;
protected static ?string $navigationIcon = 'heroicon-o-calendar';
public function getTabs(): array
{
return [
'All' => Tab::make(),
'Programmed' => Tab::make()
->modifyQueryUsing(fn(Builder $query) => $query->where('notified', false)),
'Notified' => Tab::make()
->modifyQueryUsing(fn(Builder $query) => $query->where('notified', true)),
];
}
// ...