Skip to content

Conversation

@michaelnabil230
Copy link
Contributor

Summary

This PR enhances the fluent() method in the Request class to support a default value when the requested input is missing. This improves the developer experience and prevents potential null-related issues.

Changes

  • Updated method signature to accept a second parameter: $default = [].
  • Modified method logic to return the provided default value when the input key is absent.
  • Ensures Fluent always receives a valid array structure.

@AhmedGamal905
Copy link

Much needed

@taylorotwell taylorotwell merged commit bda4494 into laravel:12.x Nov 20, 2025
66 checks passed
@michaelnabil230 michaelnabil230 deleted the feat/add-default-to-request-fluent branch November 20, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants