PHP code example of coolephp / pipeline

1. Go to this page and download the library: Download coolephp/pipeline 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/ */

    

coolephp / pipeline example snippets

 php


return [
    /*
     * 第三方服务
     */
    'providers' => [
        ...
        \Coole\Pipeline\PipelineServiceProvider::class,
        ...
    ],
];
 php
app('pipeline')
	->send($object)
    ->through($middleware)
    // ->with('bar')
    // ->via('differentMethod')
    // ->thenReturn()
    ->then(function(){
    	// middleware is finished
    });