Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection flip

$collection = collect(['name' => 'taylor', 'framework' => 'laravel']);

$flipped = $collection->flip();

$flipped->all();

// ['taylor' => 'name', 'laravel' => 'framework']
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #flip
ADD COMMENT
Topic
Name
8+2 =