Hi Jk,
<input type="date" name="date1">
Will give this desired format ("Y-m-d") as default,
and you need just this rules ['required', 'date',].
On your Model:
$protect $cast = [
'yourVariable' => 'datetime',
'yourOtherVariable' => 'datetime',
];
And also you do not need this DB query, create a Reservation model that extends eloquent.
Finally on your question you can create a Custom Validation Rules whenever you feel needed. Just click in this link and the explanation is fairly simple.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community