/** * Display a listing of the resource. * * @return Response */ public function index() { $fluid = true; if (Auth::user()->checkRole(['operator'])) { $projects = Project::operator(Request::all())->paginate(50); } else { $projects = Project::search(Request::all())->paginate(50); } return view('project.index')->with(compact('projects', 'fluid')); }