I am a beginner to laravel. I am using an eloquent query to retrieve data from a table. Table columns look like this.
id | started_at | finished_at
1 2016-06-01 2016-06-30
2 2016-05-03 2016-05-28
what I want to do is, give a $date (ex: 2016-06-18 ) and get the data of the row,
that the $date between started at and finished_at columns.
I have found whereBetween clauses in laravel documentation. http://ift.tt/29kIoYy But I do not have an idea to use it correctly. Any help would be much appreciated.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire