From 44e6767ffa3e0769b010d105f6654fc95a2efb3b Mon Sep 17 00:00:00 2001 From: Prem-Thakkar Date: Fri, 24 Jan 2025 01:52:10 +0530 Subject: [PATCH 1/2] [11.x]Add fluent helper to set the object for processing through the pipeline. --- src/Illuminate/Support/helpers.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Illuminate/Support/helpers.php b/src/Illuminate/Support/helpers.php index 8ecb1eb3cffe..0e472fe1233c 100644 --- a/src/Illuminate/Support/helpers.php +++ b/src/Illuminate/Support/helpers.php @@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Arr; use Illuminate\Support\Env; +use Illuminate\Support\Facades\Pipeline; use Illuminate\Support\Fluent; use Illuminate\Support\HigherOrderTapProxy; use Illuminate\Support\Once; @@ -526,3 +527,18 @@ function with($value, ?callable $callback = null) return is_null($callback) ? $value : $callback($value); } } + +if (! function_exists('flow')) { + /** + * Sets the object to be processed through the pipeline. + * + * @param mixed $passable + * @return \Illuminate\Pipeline\Pipeline + */ + function flow($passable = null) + { + return Pipeline::send($passable); + } +} + + From a7b22d99965131eb314c4be5b4078907f99acd02 Mon Sep 17 00:00:00 2001 From: Prem-Thakkar Date: Fri, 24 Jan 2025 02:27:01 +0530 Subject: [PATCH 2/2] Remove unnecessary blank lines --- src/Illuminate/Support/helpers.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Illuminate/Support/helpers.php b/src/Illuminate/Support/helpers.php index 0e472fe1233c..d0ec78e446f8 100644 --- a/src/Illuminate/Support/helpers.php +++ b/src/Illuminate/Support/helpers.php @@ -540,5 +540,3 @@ function flow($passable = null) return Pipeline::send($passable); } } - -