Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel Collection to array

use AppModelsUser;
 
$user = User::with('roles')->first();
 
return $user->toArray();
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #Laravel #Collection #array
ADD COMMENT
Topic
Name
9+3 =