src/AbstractServiceProvider.php
final protected function publishDirectory($from, $to)
    {
        // Load mount manager
        $manager = new MountManager([
            'from' => new Flysystem(new LocalAdapter($from)),
            'to'   => new Flysystem(new LocalAdapter($to)),
        ]);

        // Copy directory to application
        foreach ($manager->listContents('from://', true) as $file) {
            if ($file['type'] !== 'file') {
                continue;
            }
            $manager->put(sprintf('to://%s', $file['path']), $manager->read(sprintf('from://%s', $file['path'])));
        }

        // Output status message
        $this->getCommand()->line(
            sprintf('<info>Copied %s</info> <comment>[%s]</comment> <info>To</info> <comment>[%s]</comment>',
                'Directory', str_replace(base_path(), '', realpath($from)), str_replace(base_path(), '', realpath($to)))
        );
    }
final protected function publishDirectory($from, $to)
    {
        // Load mount manager
        $manager = new MountManager([
            'from' => new Flysystem(new LocalAdapter($from)),
            'to'   => new Flysystem(new LocalAdapter($to)),
        ]);

        // Copy directory to application
        foreach ($manager->listContents('from://', true) as $file) {
            if ($file['type'] !== 'file') {
                continue;
            }
            $manager->put(sprintf('to://%s', $file['path']), $manager->read(sprintf('from://%s', $file['path'])));
        }

        // Output status message
        $this->getCommand()->line(
            sprintf('<info>Copied %s</info> <comment>[%s]</comment> <info>To</info> <comment>[%s]</comment>',
                'Directory', str_replace(base_path(), '', realpath($from)), str_replace(base_path(), '', realpath($to)))
        );
    }
final protected function publishDirectory ( $ from , $ to ) { // Load mount manager $ manager = new MountManager ( [ 'from' => new Flysystem ( new LocalAdapter ( $ from ) ) , 'to' => new Flysystem ( new LocalAdapter ( $ to ) ) , ] ) ; // Copy directory to application foreach ( $ manager -> listContents ( 'from://' , true ) as $ file ) { if ( $ file [ 'type' ] !== 'file' ) { continue ; } $ manager -> put ( sprintf ( 'to://%s' , $ file [ 'path' ] ) , $ manager -> read ( sprintf ( 'from://%s' , $ file [ 'path' ] ) ) ) ; } // Output status message $ this -> getCommand ( ) -> line ( sprintf ( '<info>Copied %s</info> <comment>[%s]</comment> <info>To</info> <comment>[%s]</comment>' , 'Directory' , str_replace ( base_path ( ) , '' , realpath ( $ from ) ) , str_replace ( base_path ( ) , '' , realpath ( $ to ) ) ) ) ; }
Publish directory to application.

@author Morten Rugaard <moru@nodes.dk>

@param string $from
@param string $to

@return void
Publish directory to application .