Skip to content

Commit

Permalink
Changes in the saveMany method to return a model collection.
Browse files Browse the repository at this point in the history
  • Loading branch information
laraning committed Sep 10, 2018
1 parent 092ca41 commit a57ac46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/CanSaveMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait CanSaveMany
*
* @return array The created models array.
*/
public static function saveMany(array $datasets) : array
public static function saveMany(array $datasets)
{
$models = [];

Expand All @@ -32,6 +32,6 @@ public static function saveMany(array $datasets) : array
$models[] = $model;
}

return $models;
return collect($models);
}
}

0 comments on commit a57ac46

Please sign in to comment.