Back

Hey Laravel Developers

Have you heard about the fluent() helper function in Laravel?

If you’re working with long multidimensional arrays, objects, or a mix of both, you may sometimes feel unsure whether to use array or object syntax to access nested elements.

This is where the fluent() helper function shines! It lets us access elements using either object or array syntax—no more confusion.

Also, if an element doesn’t exist at the given index, the Fluent class returns null instead of throwing an ErrorException.

The fluent() helper method also allows access to nested child elements using dot notation, which is extremely convenient.

image

71

  • No matching results...
  • Searching...

/ 1000