1. Home
  2. Laravel
  3. Pluck

Pluck is an eloquent helper function for narrowing down your database queries and returning a collection of specific columns.

#laravel#eloquent#db
$item->getAllSubitems->pluck('title');
copy
Full Laravel cheatsheet