get('only') != '') { $query->whereIn('key', $request->get('only')); } return $query->get(); } }