EasyAdminBundle
EasyAdminBundle copied to clipboard
setDefaultSort by date and ignore null values
Hello, in my controller I've :
public function configureCrud(Crud $crud): Crud
{
return parent::configureCrud($crud)
->setDefaultSort(['sentForValidationAt' => 'ASC'])
;
}
So I want to sort by default on a datetime property, to display on top the rows with the min date value. But it displays rows with null values, and I want to ignore "null values" from the default sort. Is it possible ?
see https://symfony.com/bundles/EasyAdminBundle/current/crud.html#customizing-crud-actions
Define a custom method createIndexQueryBuilder (and ignore null values)