middleware('auth'); } /** * Display a listing of released and accepted datasets. * * @return \Illuminate\Http\Response */ public function index() : View { $user = Auth::user(); $userId = $user->id; $builder = Dataset::query(); //"select * from [documents] where [server_state] in (?) or ([server_state] = ? and [editor_id] = ?)" $datasets = $builder ->where('server_state', 'approved') ->where('reviewer_id', $userId) ->get(); return view('workflow.review.index', compact('datasets')); } }