The table have a startDate column which is VARCHAR type, so need to get rows by ascending order using this column.
Tried this :
orderBy(DB::raw("DATE(startDate)"), 'ASC')
the above does not return correct order, how to pass string date in order by clouse?
Example:
'startDate' => '07-Nov-2017'
$items = DB::table("mytable")->orderBy(DB::raw("DATE(startDate)"), 'ASC')->where('userId','=',$userId)->get();
startDateformat?startDatecontent.