all(); return view('staff.studies.index', compact('studies')); } public function details() { $this->decodeKeys(); $study = Study::with(['details'])->findOrFail($this->key); audit() ->did(Activity::Study_Metadata_View) ->on($study) ->log(); // return view('staff.studies.details', compact('study')); return response()->json($study); } }