PHP code example of atilla / submodules

1. Go to this page and download the library: Download atilla/submodules 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/ */

    

atilla / submodules example snippets


return [
    'submodules_path' => 'src/SubModules',
    'namespace' => 'SubModules',
    'structure' => [
        'Controllers',
        'Models',
        'Providers',
        // More to come...
    ],
    'files' => [
        'service_provider' => true,
        'controller' => true,
        'model' => true,
        // Configure which files to generate...
    ]
];
bash
php artisan vendor:publish --tag=submodules-config
bash
php artisan make:module Blog

src/SubModules/Blog/
├── Controllers/
│   └── BlogController.php
├── Models/
│   └── Blog.php
└── Providers/
    └── BlogServiceProvider.php
    ... etc
bash
php artisan vendor:publish --tag=module-generator-stubs