Laravel's Eloquent whereDate() filtering method
Laravel provides many additional methods other than standard methods. You might be familiar with
whereJsonLength(). And these additional methods are worth checking.
In this article, we will see
whereDate(), one of the supplementary method that comes handy when you want to compare the table’s field value with a specific date.
whereDate() method helps to get records matching the specific date.
$users = User::whereDate('birth_date', '2020-12-31')->get();
$orders = Order::whereDate('created_at', '2021-01-19')->get();
Happy 😄 coding
With ❤️ from 🇮🇳