You can use $request->whenFilled() to execute some logic only when a specific value is part of the request data
- ·
- Telegram
- ·
- Newsletter
🔥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!