mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
17 lines
719 B
Markdown
17 lines
719 B
Markdown
---
|
|
title: 'You can use $request->whenFilled() to execute some logic only when a specific value is part of the request data'
|
|
tweet_id: '1469321066182955010'
|
|
thread_slug: weekly-thread-2021-49
|
|
author_username: mmartin_joo
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FF38VhkXsAAv0VW.png'
|
|
created_at: 2021-12-10T15:00:15+00:00
|
|
slug: 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!
|