Laravel Eloquent compare date from datetime field

Laravel 4+ offers you these methods: whereDay(), whereMonth(), whereYear() (#3946) and whereDate() (#6879). They do the SQL DATE() work for you, and manage the differences of SQLite. Your result can be achieved as so: ->whereDate(‘date’, ‘<=’, ‘2014-07-10’) For more examples, see first message of #3946 and this Laravel Daily article. Update: Though the above method … Read more