/** * Remove the specified Status from storage. * * @param int $id * * @return Response */ public function destroy($id) { $status = $this->statusRepository->find($id); if (empty($status)) { Flash::error('Status not found'); return redirect(route('statuses.index')); } $this->statusRepository->delete($id); Flash::success('Status deleted successfully.'); return redirect(route('statuses.index')); }
public function iface($iface) { $statusRepo = new StatusRepository(); $out = $statusRepo->getStatusIface($iface); return $this->respondWithData($out); }
/** * Remove the specified Status from storage. * DELETE /statuses/{id} * * @param int $id * * @return Response */ public function destroy($id) { $this->statusRepository->apiDeleteOrFail($id); return $this->sendResponse($id, "Status deleted successfully"); }