Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

pluck only category name and id from model in laravel

$categories = Category::all()->pluck('name', 'id');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pluck #category #id #model #laravel
ADD COMMENT
Topic
Name
4+8 =