public function postAddJobLayout(Request $request) { $request['user_id'] = Auth::user()->id; if ($request['logo_image']) { $destinationPath = 'uploads'; // upload path $extension = Input::file('logo_image')->getClientOriginalExtension(); // getting image extension $fileName = time() . '.' . $extension; // renameing image $request['logo'] = $fileName; Input::file('logo_image')->move($destinationPath, $fileName); } if ($request['header_image']) { $destinationPath = 'uploads'; // upload path $extension = Input::file('header_image')->getClientOriginalExtension(); // getting image extension $headerfile = time() + 1 . '.' . $extension; // renameing image Input::file('header_image')->move($destinationPath, $headerfile); $request['header'] = $headerfile; } $jobaddlayout = Jobaddlayout::create($request->all()); return view('job.index')->with('job', Job::find($request['job_id']))->with('educationalqualifications', Educationalqualification::lists('name', 'id'))->with('joblevels', Joblevel::lists('name', 'id'))->with('industries', Industry::lists('name', 'id'))->with('jobtypes', Jobtype::lists('name', 'id'))->with('jobcategories', Jobcategory::lists('name', 'id'))->with('level', 2); return $request; }
/** * Show the form for editing the specified resource. * * @param int $eid employer_id * @param int $id jobpost_id * @return Response */ public function edit($eid, $id) { $employer = Employer::findOrFail($eid); $jobpost = Jobpost::findOrFail($id); $jobtypes = Jobtype::lists("name", "id"); $employment_types = Employment_type::lists("name", "id"); return view('jobposts.edit', compact('employer', 'jobpost', 'jobtypes', 'employment_types')); }
/** * Lists the job posts of a job type . * * @param int $id profile id * @param int $tid job type id * @return Response */ public function forjobtype($id, $tid) { //dd($id); $profile = Profile::findOrFail($id); $jobposts = Jobpost::byjobtype($tid)->get(); $jobtype = Jobtype::findOrFail($tid); //return response()->json(compact('jobposts')); return view('candidate_jobposts.forjobtype', compact('profile', 'jobposts', 'jobtype')); }
/** * Remove the specified resource from storage. * * @param int $iid industry_id * @param int $id jobtype_id * @return Response */ public function destroy($iid, $id) { $industry = Industry::findOrFail($iid); $jobtype = Jobtype::findOrFail($id); $jobtype->delete(); //dd($iid, $id); return view('jobtypes.index', compact('industry')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $jobtype = Jobtype::findOrFail($id); $jobtype->delete(); return redirect()->route('admin.jobtypes.index'); }