public function getStudentRecord($id) { $testResult = test::where('user_id', $id)->first(); $data = $this->getInterpretations($testResult->user->fname . " " . $testResult->user->lname . " " . " | Result", $testResult); return view('records/student')->with($data)->with('testResult', $testResult); }