1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/create-fluent-objects.md
2021-04-07 20:16:47 +02:00

479 B

title tweet_id thread_slug author_username images created_at slug
Create fluent objects 1272822468219109377 laravel-clean-code-tactics samuelstancl
https://pbs.twimg.com/media/Ean3zqXWAAASnOP.png
2020-06-16T09:24:58+00:00 create-fluent-objects

You can also create objects with fluent APIs. Gradually add data by with separate calls, and only require the absolute minimum in the constructor.

Each method will return $this, so you can stop at any call.