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;
 }
Exemplo n.º 2
0
 /**
  * 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'));
 }