Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel model to array

use AppModelsUser;

$user = User::with('roles')->first();

return $user->toArray();
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #model #array
ADD COMMENT
Topic
Name
5+6 =