My laravel eloquent is like this :
public function search(Request $request)
{
$search = \'\';
$searchdate = \'2017-04-27\';
$reports = Report::where
change the query to
$reports = Report::where(function($q) use ($search){
$q->whereHas('user', function($query) use ($search) {
$query->where(function ($q) use($search){
$q->where('name' ,'LIKE' ,'%'.$search.'%');
});
})->orWhereHas('store', function($query) use ($search){
$query->where(function ($q) use($search){
$q->where('name', 'LIKE', '%'.$search.'%');
});
})->orWhereHas('category', function($query) use ($search){
$query->where(function ($q) use($search){
$q->where('name', 'LIKE' , '%'.$search.'%');
});
});
})->whereDate('created_at','=',$searchdate)->paginate(10);
Hope it helps