/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $pet = PetTypes::find($id); $pet->petServices()->detach(); if ($pet->delete()) { return Response::json('Pet successfully deleted.'); } return false; }
public function petTypeDelete($id) { $pet_type = PetTypes::find($id); $pet_type->delete(); return Redirect::to('pet_type/list')->with('flash_success', 'Pet type successfully deleted.'); }