コード例 #1
0
 /**
  * Remove the specified GcmMessage from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $gcmMessage = $this->gcmMessageRepository->find($id);
     if (empty($gcmMessage)) {
         Flash::error('GcmMessage not found');
         return redirect(route('gcmMessages.index'));
     }
     $this->gcmMessageRepository->delete($id);
     Flash::success('GcmMessage deleted successfully.');
     return redirect(route('gcmMessages.index'));
 }
コード例 #2
0
 /**
  * Remove the specified GcmMessage from storage.
  * DELETE /gcmMessages/{id}
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $this->gcmMessageRepository->apiDeleteOrFail($id);
     return $this->sendResponse($id, "GcmMessage deleted successfully");
 }