src/Core/Support/IncludesFiles.php
public function includes($path, string $pattern = '*.php')
    {
        foreach (Finder::create()->files()->name($pattern)->in($path)->sortByName() as $file) {
            /** @var \SplFileInfo $file */
            @include $file->getRealPath();
        }
    }
public function includes($path, string $pattern = '*.php')
    {
        foreach (Finder::create()->files()->name($pattern)->in($path)->sortByName() as $file) {
            /** @var \SplFileInfo $file */
            @include $file->getRealPath();
        }
    }
public function includes ( $ path , string $ pattern = '*.php' ) { foreach ( Finder :: create ( ) -> files ( ) -> name ( $ pattern ) -> in ( $ path ) -> sortByName ( ) as $ file ) { /** @var \SplFileInfo $file */ @ include $ file -> getRealPath ( ) ; } }
Automatically includes all .php files found on a specified
directory path.

@param string|array $path
Automatically includes all . php files found on a specified directory path .