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

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

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

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

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

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

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

@param  int $id
@param UpdatePermissionRequest $request

@return JsonResponse
Update the specified Permission in storage .