protected function runSeeders($folders, $basePath)
    {
        $filesystem = $this->filesystem;

        $this->realPath($folders, $basePath)
            ->each(function ($folder) use ($filesystem) {
                if ($filesystem->isDirectory($folder)) {
                    $files = $filesystem->files($folder);
                } else {
                    $files = [new \Symfony\Component\Finder\SplFileInfo(
                        $folder,
                        '',
                        basename($folder)
                    )];
                }

                collect($files)->filter(function ($file) {
                    return $file->getExtension() == 'php';
                })->each(function ($file) {
                    $class = substr($file->getFilename(), 0, -4);
                    require_once $file->getRealPath();

                    (new $class())->run();
                });
            });
    }
protected function runSeeders($folders, $basePath)
    {
        $filesystem = $this->filesystem;

        $this->realPath($folders, $basePath)
            ->each(function ($folder) use ($filesystem) {
                if ($filesystem->isDirectory($folder)) {
                    $files = $filesystem->files($folder);
                } else {
                    $files = [new \Symfony\Component\Finder\SplFileInfo(
                        $folder,
                        '',
                        basename($folder)
                    )];
                }

                collect($files)->filter(function ($file) {
                    return $file->getExtension() == 'php';
                })->each(function ($file) {
                    $class = substr($file->getFilename(), 0, -4);
                    require_once $file->getRealPath();

                    (new $class())->run();
                });
            });
    }
protected function runSeeders ( $ folders , $ basePath ) { $ filesystem = $ this -> filesystem ; $ this -> realPath ( $ folders , $ basePath ) -> each ( function ( $ folder ) use ( $ filesystem ) { if ( $ filesystem -> isDirectory ( $ folder ) ) { $ files = $ filesystem -> files ( $ folder ) ; } else { $ files = [ new \ Symfony \ Component \ Finder \ SplFileInfo ( $ folder , '' , basename ( $ folder ) ) ] ; } collect ( $ files ) -> filter ( function ( $ file ) { return $ file -> getExtension ( ) == 'php' ; } ) -> each ( function ( $ file ) { $ class = substr ( $ file -> getFilename ( ) , 0 , - 4 ) ; require_once $ file -> getRealPath ( ) ; ( new $ class ( ) ) -> run ( ) ; } ) ; } ) ; }
Run seeder files.

@param array  $folders
@param string $basePath
Run seeder files .