public function show($id) { $issue = Issue::find($id); $retrievals = Retrieval::where('issue_id', '=', $id)->get(); $handbooks = Handbook::where('project_id', '=', Auth::user()->curr_project_id)->where('generation_id', '=', $issue->generation_id)->get(); $menu = 'student'; return View::make('retrievals.show', compact('issue', 'retrievals', 'handbooks', 'menu')); }
public function show($id) { $employee = Employee::findOrFail($id); $registrations = Registration::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('employee_id', '=', $id)->orderBy('registration_date', 'desc')->get(); $earnings = Earning::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('employee_id', '=', $id)->get(); $retrievals = Retrieval::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('employee_id', '=', $id)->get(); $timelines = Timeline::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('informable_type', '=', 'Employee')->where('informable_id', '=', $id)->get(); $menu = 'employee'; return View::make('employees.show', compact('employee', 'registrations', 'earnings', 'retrievals', 'timelines', 'menu')); }