Laravel where clause with date_format() exampleBy Hardik Savani | June 22, 2016 | | 920 Viewer | Category : Laravel
Share this post:
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")
- Laravel 5 amazon s3 file upload tutorial - Part 2
- How to increment or decrement a column value in laravel?
- Laravel 5 Ajax CRUD with Pagination example and demo from scratch
- Laravel 5 - like query example using eloquent where clause.
- Laravel - How to remove foreign key constraint using migration?
- How to resolve - No supported encrypter found. The cipher and / or key length are invalid. in Laravel 5
- How to add multiple markers in google map
- How to make simple dependent dropdown using jquery ajax in Laravel 5?