Skip to content
Discussion options

You must be logged in to vote

Sure, here is an example action to simply update a row from a table, I have also added this example to the markplace s.

<?php

use Fusio\Worker\ExecuteContext;
use Fusio\Worker\ExecuteRequest;
use Fusio\Engine\ConnectorInterface;
use Fusio\Engine\Response\FactoryInterface;
use Fusio\Engine\DispatcherInterface;
use Psr\Log\LoggerInterface;

return function(ExecuteRequest $request, ExecuteContext $context, ConnectorInterface $connector, FactoryInterface $response, DispatcherInterface $dispatcher, LoggerInterface $logger) {

    $connection = $connector->getConnection('System');

    $payload = $request->getPayload();

    $affected = $connection->update('my_table', [
        'name' => $payload

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mrsibs
Comment options

@chriskapp
Comment options

Answer selected by mrsibs
@mrsibs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants