Slow Query - Slow Endpoints in Filamentphp v3

Screenshots shows the issues that im getting.

php public static function table(Table $table)
    {
        return $table->columns([
            Tables\Columns\TextColumn::make('user.name')
                                     ->label('Requested By')
                                     ->searchable(),
            Tables\Columns\TextColumn::make('template.title')
                                     ->label('Requested Type'),
            Tables\Columns\TextColumn::make('created_at')
                                     ->label('Requested On')
                                     ->formatStateUsing(function ($state) {
                                         return Carbon::parse($state)->diffForHumans();
                                     }),
        ])
                     ->filters([
                         Tables\Filters\SelectFilter::make('status')
                                                    ->options([
                                                        'pending'  => 'Pending',
                                                        'verified' => 'Verified',
                                                        'approved' => 'Approved',
                                                    ]),
                         Tables\Filters\TrashedFilter::make(),
                     ])
                     ->actions([
                         Tables\Actions\ViewAction::make()
                         Tables\Actions\EditAction::make(),
                         Action::make('download')
                               ->label('Download')
                               ->url(fn(Letter $record): string => Storage::url($record->file_path))
                               ->disabled(fn(Letter $record): bool => $record->status !== LetterStatus::Approved),
                     ])
                     ->selectCurrentPageOnly()
                     ->paginated([10, 25, 50, 100]);
    }
Screenshot_2024-07-01_at_22.27.50.png
Screenshot_2024-07-01_at_22.28.03.png
Screenshot_2024-07-01_at_22.28.58.png
Screenshot_2024-07-01_at_22.29.40.png
Was this page helpful?