DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
4+8 =
Submit