PHP code example of cerbero / workflow

1. Go to this page and download the library: Download cerbero/workflow library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cerbero / workflow example snippets


'Cerbero\Workflow\WorkflowServiceProvider',

use Cerbero\Workflow\RunsWorkflow;
use Cerbero\Workflow\WorkflowRunner;

abstract class Controller extends BaseController implements WorkflowRunner {

	use RunsWorkflow;

}


public function store()
{
	$this->workflow->registerUser();
}

use Cerbero\Workflow\Workflow;

class RegisterController extends Controller {

	public function __construct(Workflow $workflow)
	{
		$this->workflow = $workflow;
	}

	public function store()
	{
		$this->workflow->registerUser();
	}

}

public function store()
{
	\Workflow::registerUser();
}

php artisan vendor:publish

php artisan workflow:create RegisterUser --attach="hash notify"

php artisan workflow:create TakeItEasy --unguard

php artisan workflow:read RegisterUser

php artisan workflow:update RegisterUser --attach="upload log" --detach="notify"

php artisan workflow:update RegisterUser --detach="notify" --force

php artisan workflow:delete RegisterUser

php artisan workflow:delete RegisterUser --force