/** * Remove the specified resource from storage. * * @param int $eid employer_id * @param int $id jobpost_id * @return Response */ public function destroy($eid, $id) { $employer = Employer::findOrFail($eid); $jobpost = Jobpost::findOrFail($id); $jobpost->delete(); return view('jobposts.index', compact('employer')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $employer = Employer::findOrFail($id); $employer->delete(); //return view('employers.index', compact('employer')); return redirect('/'); }