I have a start_date and end_date field. The start_date must be today or later. The end_date must be after start_date but not greater than 30 days from the start_date.
How do I create a date 30 days from the start_date against which I can check the end_date? In the example below I'm unable to simply concat the start_date value to create a carbon instance?
'start_date' => 'required|date|after:yesterday',
'end_date' => 'required|date|after:start_at|before:' . Carbon::createFromFormat('d M Y H:i', start_date)->addDays(30),
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire