Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel eloquent to array key value

$roles = Role::all()->keyBy('name');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #eloquent #array #key
ADD COMMENT
Topic
Name
3+8 =