davedevelopment / phpmig

Simple migrations system for php
Other
569 stars 92 forks source link

Laravel adapter fetchAll not working #113

Closed ricardorzgz closed 8 years ago

ricardorzgz commented 8 years ago

Commit 0f3725a0e0809051b68f9be082cd476392e762fc breaks Laravel's adapter.

table() function returns an instance of Query\Builder so the get() returns an array not a Collection, so after this commit this package is broken for Laravel. The toArray() function is only available for the Eloquent Builder as the Eloquent one returns a collection.

PHP Fatal error: Call to a member function toArray() on a non-object in vendor/davedevelopment/phpmig/src/Phpmig/Adapter/Illuminate/Database.php on line 47

micahaza commented 8 years ago

I have the same issue. as @ricardorzgz has.

davedevelopment commented 8 years ago

Closed by #115