php - Laravel intermediate data type on query builder -


i have date inside query in laravel. query builder doesn't read date string. cant put variable inside query can't use date->format nor explode string..

here code..

if(isset($input['time']) && $input['time'] != '') {     //useless, laravel cant read     $wew = explode('/', $input['time']);     $time = $wew[0]."-".$wew[1]."-".$wew[2];      $actlist = db::table('activity')     ->join('activity_details', function($join)     {         $join->on('activity.id','=','activity_details.activity_id')              ->where('activity_details.time','>=', (date(str_replace('-','-',input::get('time')).' 00:00:00',time())) )              ->where('activity_details.time','<=', (date(str_replace('/','-',input::get('time')).' 23:59:59',time())) );     })     ->orderby('activity.id', 'desc')     ->paginate(config::get('app.conf')['pagin']); } 

the $wew = explode('/', $input['time']); returns undefined

where did go wrong?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -