PHP code example of beauty-framework / module-support

1. Go to this page and download the library: Download beauty-framework/module-support library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

beauty-framework / module-support example snippets


return [
    'controllers' => [
        __DIR__ . '/../modules/*/src/Controllers/**/*Controller.php',
    ],
];

$bootstrap = new class {
    use \Beauty\Module\Core\HasModuleSupportTrait;

    /**
     * @return object
     * @property array $middlewares
     * @property ContainerManager $containerManager
     * @property array $routerConfig
     */
    public function boot(): object
    {
    // ...
    }
    
    // ...
}
 
        return ContainerManager::bootFrom(array_merge(
            $containers,
            $this->findModuleContainerClasses(),
            [Config::class, Base::class, DI::class]
        ));

return [
    ...
    \Beauty\Module\Console\RegisterCommands::commands(),
    ...
];