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/you-can-use-request-whenfilled-to-execute-some-logic-only-when-a-specific-value-is-part-of-the-request-data.md
2021-12-10 16:25:33 +01:00

719 B

title tweet_id thread_slug author_username images created_at slug
You can use $request->whenFilled() to execute some logic only when a specific value is part of the request data 1469321066182955010 weekly-thread-2021-49 mmartin_joo
https://pbs.twimg.com/media/FF38VhkXsAAv0VW.png
2021-12-10T15:00:15+00:00 you-can-use-request-whenfilled-to-execute-some-logic-only-when-a-specific-value-is-part-of-the-request-data

🔥Another amazing #Laravel feature!🔥

We often write if statements to check if a value is present on a request or not.

You can simplify it with the whenFilled() helper.

👋If you find this useful, consider clicking the button that says Retweet. It's a very cool button!