whereDay Query Use in Laravel 5.8, whereDay Query Use in Laravel 5.7, whereDay Query Use in Laravel 5.6, whereDay Query Use in Laravel 5.5, whereDay Query Use in Laravel 5.4, whereDay Query Use in Laravel 5.3, whereDay Query Use in Laravel 5.2
Hello Friends Today I will tell you through tutorials that whereDay query is used in the laravel framework.
The whereDay method may be used to compare a column’s value against a specific day of a month.
$day = '10'; $blog = DB::table('blogs') ->whereDay('created_at', $day) ->get();
By creating a model of your table, this query can be written in this way
$day = '10'; $blog = Blog::whereDay('created_at', $day)->get();