Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel model from object

$myArray = ['name' => 'Fake Name', 'email' => 'abc@mail.com'];
MyModel::make($myArray);

$myArray2 = $myCollection->toArray();
MyModel::make($myArray2);
 
PREVIOUS NEXT
Tagged: #laravel #model #object
ADD COMMENT
Topic
Name
6+5 =