public function update($id, UpdateRoleRequest $request)
    {
        $role = $this->repository->findWithoutFail($id);

        if (empty($role)) {
            return $this->sendError('Role not found');
        }

        $role = $this->repository->update($request->all(), $id);
        $role->load($request->getWith());

        return $this->sendResponse($role, 'Role updated successfully.');
    }
public function update($id, UpdateRoleRequest $request)
    {
        $role = $this->repository->findWithoutFail($id);

        if (empty($role)) {
            return $this->sendError('Role not found');
        }

        $role = $this->repository->update($request->all(), $id);
        $role->load($request->getWith());

        return $this->sendResponse($role, 'Role updated successfully.');
    }
public function update ( $ id , UpdateRoleRequest $ request ) { $ role = $ this -> repository -> findWithoutFail ( $ id ) ; if ( empty ( $ role ) ) { return $ this -> sendError ( 'Role not found' ) ; } $ role = $ this -> repository -> update ( $ request -> all ( ) , $ id ) ; $ role -> load ( $ request -> getWith ( ) ) ; return $ this -> sendResponse ( $ role , 'Role updated successfully.' ) ; }
Update the specified Role in storage.

@param  int $id
@param UpdateRoleRequest $request

@return JsonResponse
Update the specified Role in storage .