You can use $request->whenFilled() to execute some logic only when a specific value is part of the request data

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!

We're writing a book, you can get it for free here.