PHP code example of corbosman / laravel-pipeline-passable
1. Go to this page and download the library: Download corbosman/laravel-pipeline-passable 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/ */
corbosman / laravel-pipeline-passable example snippets
use CorBosman\Pipeline\Passable;
class MyPipeline extends Passable
{
public string $username;
public array $output;
public function return() : array
{
return $this->output;
}
}
use CorBosman\Pipeline\Passable;
class MyPipeline extends Passable
{
public string $username;
public Output $output;
public static function factory($username) : self
{
return new self([
'username' => $username,
'output' => new Output
]);
}
public function return() : array
{
return $this->output->toArray();
}
}