If you have Filament, you know how to establish the predetermined order of the registers that appear in the Resource tab. In this article, you will see the message that is logged. Only you need to add the default function Sort into the method table in your Filament Resource.
To order records when creating a descendent form, use the following code:
->defaultSort('created_at', 'desc');
Here is a more complete example that includes additional actions to edit and delete records at hand:
->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]) ->defaultSort('created_at', 'desc');
This will allow you to control how the data is displayed when you apply it from the first moment, improving the user experience and facilitating the administration of the registers.
Page loaded in 26.15 ms