标签:ret nbsp bsp 管道 highlight function return request div
废话不多说 直接上代码
public function index2(){ $pipe1 = function ($payload, \Closure $next) { $payload = $payload + 1; return $next($payload); }; $pipe2 = function ($payload, \Closure $next) { $payload = $payload * 3; return $next($payload); }; // $data = $request->input(‘data‘, 0); $data = 0; $pipeline = new Pipeline(); return $pipeline ->send($data) ->through([$pipe1, $pipe2]) ->then(function ($data) { return $data; }); }
标签:ret nbsp bsp 管道 highlight function return request div
原文地址:https://www.cnblogs.com/cbywan/p/12268488.html