/** * Remove category skill * * @param int $id * @return string */ public function destroy($id) { $cskill = CategorySkill::find($id); if ($cskill != null) { $cskill->delete(); } return json_encode("success"); }
/** * Show Cv information * * @param int $id * @return Response */ public function show($id) { $positions = Position::all(); $employee = Employee::find($id); $educations = Education::where('employee_id', '=', $employee->id)->get(); $employee_skills = EmployeeSkill::where('employee_id', '=', $employee->id)->get(); $experiences = WorkingExperience::where('employee_id', '=', $employee->id)->get(); $taken_projects = TakenProject::where('employee_id', '=', $employee->id)->get(); $nationalities = Nationality::all(); $category_skill = CategorySkill::all(); return view('printpreview.printpreview', compact('taken_projects', 'position', 'employee_skills', 'nationalities', 'employee', 'educations', 'experiences', 'category_skill')); }
/** * Show and Export CV information * * @param [int] $id * @return Response */ public function show($id) { $positions = Position::all(); $employee = Employee::find($id); $educations = Education::where('employee_id', '=', $employee->id)->get(); $employee_skills = EmployeeSkill::where('employee_id', '=', $employee->id)->get(); $experiences = WorkingExperience::where('employee_id', '=', $employee->id)->get(); $taken_projects = TakenProject::where('employee_id', '=', $employee->id)->get(); $nationalities = Nationality::all(); $category_skill = CategorySkill::all(); $parameterr = array(); $parameter['employee'] = $employee; $parameter['educations'] = $educations; $parameter['category_skill'] = $category_skill; $parameter['employee_skills'] = $employee_skills; $parameter['taken_projects'] = $taken_projects; $parameter['experiences'] = $experiences; $parameter['nationalities'] = $nationalities; $pdf = \PDF::loadView('welcome', $parameter)->setPaper('a4')->setOrientation('landscape')->setWarnings(false); return $pdf->download('cv.pdf'); }