"value":"\n <p>I've seen a lot on social media and posts and videos recently about Laravel Pipelines - functionality that's been present in Laravel and used within the framework for some time - but there was only documentation added for it last month as part of the Laravel 10 release.<\/p>\n\n<p>This is an example from the new documentation:<\/p>\n\n<pre><code class=\"language-php\">$user = Pipeline::send($user)\n ->through([\n GenerateProfilePhoto::class,\n ActivateSubscription::class,\n SendWelcomeEmail::class,\n ])\n ->then(fn (User $user) => $user);\n<\/code><\/pre>\n\n<p>Once a user has registered, it is passed through different classes - each performing a task and calling the next class in the list, similar to middleware. Once finished, a final action is performed or a value is returned.<\/p>\n\n<p>As someone who doesn't use Laravel often but does use standalone components - like <code>illuminate\/collections<\/code> - in other PHP projects, I'm interested to see how I can use this via <code>illuminate\/pipeline<\/code> to refactor some of my existing code.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>I've seen a lot on social media and posts and videos recently about Laravel Pipelines - functionality that's been present in Laravel and used within the framework for some time - but there was only documentation added for it last month as part of the Laravel 10 release.<\/p>\n\n<p>This is an example from the new documentation:<\/p>\n\n<pre><code class=\"language-php\">$user = Pipeline::send($user)\n ->through([\n GenerateProfilePhoto::class,\n ActivateSubscription::class,\n SendWelcomeEmail::class,\n ])\n ->then(fn (User $user) => $user);\n<\/code><\/pre>\n\n<p>Once a user has registered, it is passed through different classes - each performing a task and calling the next class in the list, similar to middleware. Once finished, a final action is performed or a value is returned.<\/p>\n\n<p>As someone who doesn't use Laravel often but does use standalone components - like <code>illuminate\/collections<\/code> - in other PHP projects, I'm interested to see how I can use this via <code>illuminate\/pipeline<\/code> to refactor some of my existing code.<\/p>\n\n ",