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