{ "uuid": [ { "value": "dcae03b2-1838-4db7-9b1d-3fe87b70c19a" } ], "langcode": [ { "value": "en" } ], "type": [ { "target_id": "daily_email", "target_type": "node_type", "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" } ], "revision_timestamp": [ { "value": "2025-05-11T09:00:44+00:00" } ], "revision_uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "revision_log": [], "status": [ { "value": true } ], "uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "title": [ { "value": "Laravel Pipelines\n" } ], "created": [ { "value": "2023-04-23T00:00:00+00:00" } ], "changed": [ { "value": "2025-05-11T09:00:44+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2023\/04\/23\/laravel-pipelines", "langcode": "en" } ], "body": [ { "value": "\n

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

This is an example from the new documentation:<\/p>\n\n

$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

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

As someone who doesn't use Laravel often but does use standalone components - like illuminate\/collections<\/code> - in other PHP projects, I'm interested to see how I can use this via illuminate\/pipeline<\/code> to refactor some of my existing code.<\/p>\n\n ", "format": "full_html", "processed": "\n

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

This is an example from the new documentation:<\/p>\n\n

$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

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

As someone who doesn't use Laravel often but does use standalone components - like illuminate\/collections<\/code> - in other PHP projects, I'm interested to see how I can use this via illuminate\/pipeline<\/code> to refactor some of my existing code.<\/p>\n\n ", "summary": null } ] }