In this article, We will explain to you how to use the WhereDay query in laravel(laravel eloquent WhereDay query example). here we will give you a simple example of laravel eloquent WhereDay query.
The laravel eloquent provides many types of eloquent methods. The WhereDay method compares a column’s value to the search of a specific day in the database and if matches any date in the database then it will return data.
So you can see below the following example.
1 2 3 | $students = DB::table('students') ->whereDay('created_at', '20') ->get(); |