/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $employment_type = Employment_type::findOrFail($id);
     $employment_type->delete();
     //return redirect('employment_types');
     return redirect('employment_types')->with('message', 'Employment Type deleted');
 }
예제 #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'));
 }