public static function cache()
    {
        $cache = [];

        $finder = (new Finder())
            ->files()
            ->name('/.+\.php/')
            ->in(ROOT . 'config');

        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            $category = str_ireplace('.php', '', $file->getFilename());
            $config = require $file->getRealPath();

            $cache[$category] = $config;
        }

        file_put_contents(ROOT . 'storage/crispysystem.config.php', serialize($cache));
    }
public static function cache()
    {
        $cache = [];

        $finder = (new Finder())
            ->files()
            ->name('/.+\.php/')
            ->in(ROOT . 'config');

        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            $category = str_ireplace('.php', '', $file->getFilename());
            $config = require $file->getRealPath();

            $cache[$category] = $config;
        }

        file_put_contents(ROOT . 'storage/crispysystem.config.php', serialize($cache));
    }
public static function cache ( ) { $ cache = [ ] ; $ finder = ( new Finder ( ) ) -> files ( ) -> name ( '/.+\.php/' ) -> in ( ROOT . 'config' ) ; /** @var SplFileInfo $file */ foreach ( $ finder as $ file ) { $ category = str_ireplace ( '.php' , '' , $ file -> getFilename ( ) ) ; $ config = require $ file -> getRealPath ( ) ; $ cache [ $ category ] = $ config ; } file_put_contents ( ROOT . 'storage/crispysystem.config.php' , serialize ( $ cache ) ) ; }
Cache the configuration files into one file
@since 1.0.0
Cache the configuration files into one file