New in Laravel: Accessing request data fluently

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 7

  • @1234matthewjohnson
    @1234matthewjohnson 23 дні тому +1

    just be as strict as possible, enforce types along the way and return meaningful errors. love the vid tho bro and you have a new sub :)

  • @binaryfire
    @binaryfire 26 днів тому

    Will ->fluent() work on validated data returned by a form request? Or does it only work on the raw request object?

    • @codecourse
      @codecourse  26 днів тому

      Great question! I haven’t tried this yet

  • @ward7576
    @ward7576 26 днів тому +3

    I am starting to think that developers want these things merged in for the sake of merging in and being seen among contributors. What's so tough of making this as a Request macro or just wrapping request()->all() into an instance of Fluent? Readability is not really a concern here as that could be applied to any "wrapping" of a state.

    • @codecourse
      @codecourse  26 днів тому +2

      I see your point but these are just optional things. By adding this, nothing changes except another option to choose from. Laravel’s philosophy has always been about developer productivity and this addition matches that - a lot of pull requests are still closed.