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