Dynamic date creation depending on the current fixture with nelmio/alice

Published on 2021-10-24 • Modified on 2021-10-24

This snippet shows how to create a dynamic date depending on the current fixture with nelmio/alice. The trick is to use the $current variable within the argument of the date_create function. In this case, we create a hundred events every day from tomorrow.


App\Entity\Event:
    event_{1..100}:
        start_time: <(date_create('+'. $current. 'day'))>

 More on Stackoverflow   Read the doc  Random snippet

  Work with me!


Call to action

Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )

Thank you for reading! And see you soon on Strangebuzz! 😉

COil