Skip to content

Commit

Permalink
Merge pull request #394 from cbaconnier/master
Browse files Browse the repository at this point in the history
#391 Fix undefined variable factory when loading factories
  • Loading branch information
kaidesu authored Feb 12, 2019
2 parents 34b5aa0 + 91d5590 commit ff52793
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Support/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use SplFileInfo;
use Symfony\Component\Finder\Finder;
use Illuminate\Support\ServiceProvider as IlluminateServiceProvider;
use Illuminate\Database\Eloquent\Factory;

class ServiceProvider extends IlluminateServiceProvider
{
Expand Down Expand Up @@ -65,9 +66,7 @@ protected function loadConfigsFrom($path)
*/
protected function loadFactoriesFrom($path)
{
foreach (glob($path.'/*.php') as $file) {
require $file;
}
app(Factory::class)->load($path);
}

/**
Expand Down

0 comments on commit ff52793

Please sign in to comment.