Laravel where clause with date_format() exampleBy Hardik Savani | June 22, 2016 | | 4069 Viewer | Category : Laravel
In this post, i share with you that how to use date_format() with where condition of Laravel query builder. When i was working on my project, i require to search with get only selected month and year records from created_at(timestamp) column. I was thinking how can i but i know date_format() of mysql. but don't know how to use in laravel where clause. At last i use DB::raw() of Laravel and it's work.
If you have also need to search this way then you can do it this way:
$data = DB::table("items")
- Jquery notification popup box example using toastr JS plugin with demo
- PHP - How to custom file uploading with CKEDITOR?
- How to remove null values from array in PHP?
- PHP - Capture screenshot of website from URL example
- How to create and check custom header with middleware for REST API in Laravel 5 ?
- How to check if string is URL or not in PHP?
- Laravel 5 Google OAuth authentication using Socialite Package
- How to set bootstrap timepicker using datetimepicker library example code