1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/higher-order-messages-are-a-great-way-to-tidy-up-long-collection-logic.md
lukinovec e907eba3dd
Weekly thread #4 (#26)
* Use Author::updateOrCreate instead of firstOrCreate

* Weekly tips #4
2022-01-28 18:03:12 +01:00

13 lines
No EOL
546 B
Markdown

---
title: 'Higher-order messages are a great way to tidy up long collection logic'
tweet_id: '1487081947864002572'
thread_slug: weekly-thread-2022-04
author_username: alexjgarrett
images:
- 'https://pbs.twimg.com/media/FKD7ajmXIAAEjTW.jpg'
created_at: 2022-01-28T15:15:39+00:00
slug: higher-order-messages-are-a-great-way-to-tidy-up-long-collection-logic
---
Sometimes I forget about higher order collection messages in Laravel, but they're a great way to shorten and tidy up your code ✨
Here's a simplified (and not recommended) example.