コード例 #1
0
 public function delete($id)
 {
     // Checking if userRole exists
     $userRole = UserRole::find($id);
     // If userRole exists
     if (!empty($userRole)) {
         // Delete userRole
         $userRole->delete();
         // Returning success message
         return $this->responseService->returnSuccess();
     } else {
         // UserRole not found
         // Returning error message
         return $this->responseService->errorMessage('UserRole was not Found.');
     }
 }