public function addNamespacesToRegistry($namespaces)
    {
        collect((array) $namespaces)->each(function ($namespace) {
            // Get path from namespace.
            $path = $this->getPathFromNamespace($namespace);

            if (file_exists($path)) {
                // Register each annotations file found in the namespace.
                foreach (Finder::create()->files()->name('*.php')->in($path) as $file) {
                    $this->addFilesToRegistry($file->getRealPath());
                }
            }
        });

        return $this;
    }
public function addNamespacesToRegistry($namespaces)
    {
        collect((array) $namespaces)->each(function ($namespace) {
            // Get path from namespace.
            $path = $this->getPathFromNamespace($namespace);

            if (file_exists($path)) {
                // Register each annotations file found in the namespace.
                foreach (Finder::create()->files()->name('*.php')->in($path) as $file) {
                    $this->addFilesToRegistry($file->getRealPath());
                }
            }
        });

        return $this;
    }
public function addNamespacesToRegistry ( $ namespaces ) { collect ( ( array ) $ namespaces ) -> each ( function ( $ namespace ) { // Get path from namespace. $ path = $ this -> getPathFromNamespace ( $ namespace ) ; if ( file_exists ( $ path ) ) { // Register each annotations file found in the namespace. foreach ( Finder :: create ( ) -> files ( ) -> name ( '*.php' ) -> in ( $ path ) as $ file ) { $ this -> addFilesToRegistry ( $ file -> getRealPath ( ) ) ; } } } ) ; return $ this ; }
Adds namespaces containing annotations to the registry.

@param array|string $namespaces

@return $this
Adds namespaces containing annotations to the registry .