Пример #1
0
 /**
  * Remove the specified Role from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $this->authorize('system.manage');
     $role = $this->roleRepository->findWithoutFail($id);
     if (empty($role)) {
         Flash::error('Role not found');
         return redirect(route('roles.index'));
     }
     $this->roleRepository->delete($id);
     Flash::success('Role deleted successfully.');
     return redirect(route('roles.index'));
 }