1. Home
  2. Laravel
  3. Pluck
#laravel#eloquent#db

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

$item->getAllSubitems->pluck('title');
copy
Full Laravel cheatsheet
Sitemap Git repository