/** * Remove the specified service from storage. * * @param int $id * @return Response */ public function destroyService() { $id = Input::get('id'); if (Service::destroy($id)) { echo json_encode(array('code' => 0, 'messages' => Lang::get('site/services/messages.delete.success'))); } else { echo json_encode(array('code' => 1, 'messages' => Lang::get('site/services/messages.delete.error'))); } }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { return $this->service->destroy($id); }
public static function destroy($id) { $service = new Service(array('id' => $id)); $service->destroy($id); Redirect::to('/palvelut', array('message' => 'Palvelu poistettu onnistuneesti!')); }