Skip to content

Commit

Permalink
Merge pull request #115 from ricardorzgz/patch-1
Browse files Browse the repository at this point in the history
Fixed PHP fatal error when working with Laravel Database 5.2
  • Loading branch information
davedevelopment authored Sep 15, 2016
2 parents cd37044 + 779cfa7 commit 85a7e8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Phpmig/Adapter/Illuminate/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public function fetchAll()
$all = $this->adapter
->table($this->tableName)
->orderBy('version')
->get()->toArray();
->get();

if(!is_array($all)) {
$all = $all->toArray();
}

return array_map(function($v) use($fetchMode) {

Expand Down

0 comments on commit 85a7e8b

Please sign in to comment.