Laravel developers, ever wanted pluck()-like output with more than one column?

pluck() is intentionally designed for a single value.

Instead, retrieve only the columns you need and use map->only().

Need the collection keyed by id? mapWithKeys() does the trick.
image

15

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

/ 1000