コード例 #1
0
 /**
  * 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'));
 }
コード例 #2
0
 public function iface($iface)
 {
     $statusRepo = new StatusRepository();
     $out = $statusRepo->getStatusIface($iface);
     return $this->respondWithData($out);
 }
コード例 #3
0
 /**
  * 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");
 }