vendredi 8 septembre 2017

i have two fields named as created_at and updated_at(timestamps) and i want to search between these dates in my where clause

i want to take input date as a parameter and search between the dates that are given in input.

Theses are the timestamps() provided by laravel to create the two fields as created_at and upated_at

  $startDate = $request->input('created_at');
  $endDate   = $request->input('updated_at');

->select()
->whereBetween('created_at','updated_at',[$startDate,$endDate])
->get();



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire