Default for DateField & display multiple results - Easyadmin 4 with Symfony 7

70 views Asked by At

I use Symfony 7 with the easyadmin bundle 4 for my new project. I now have two problems for which I have no solution.

  1. I have a DateField for which I would like to set today as the default value, because most times when i add a new entry, i need to chose today as the new date value:

    in configureFields:

     return [
         yield DateField::new('date')->setColumns(2),
         ...
     ];
    
  2. I connected some data with my domainlist. Every data can have many domains (ManyToMany). On the index page there is only a 2, but not the 2 individual domains.

    in configureFields:

     return [
         yield AssociationField::new('domain')->setColumns(6)
         ...
     ];
    
0

There are 0 answers