public function postSkills(Request $req) { $rules = ['skill' => ['required', 'min:2'], 'skill_level' => ['required', 'integer'], 'skill_type' => ['required']]; $valid = Validator::make($req->input(), $rules); if (!$valid->fails()) { $skill = new Skills(); $skill->skill = $req->input('skill'); $skill->skill_range = $req->input('skill_level'); $skill->type = $req->input('skill_type'); if ($skill->save()) { return redirect()->back()->with('msg', 'Successfully Saved'); } } else { return redirect()->back()->withErrors($valid->errors()); } }
public function resumePage() { $edu = WorkEdu::where('type', 0)->orderBy('id', 'desc')->get(); $work = WorkEdu::where('type', 1)->orderBy('id', 'desc')->get(); $skillsArray = Skills::get(); $skillsCollections = Collection::make($skillsArray); $skillsProfessional = $skillsCollections->where('type', 'professional'); $skillsAdditional = $skillsCollections->where('type', 'additional'); return View::make('site.resume', ['pageInfo' => ['siteTitle' => 'Resume', 'pageHeading' => 'Resume', 'pageHeadingSlogan' => "Here is my qualifications and experience", 'pageLogo' => 'resume'], 'data' => ['edu' => $edu, 'work' => $work, 'skillsPro' => $skillsProfessional, 'skillsAdd' => $skillsAdditional]]); }