PHP code example of zonneplan / laravel-module-loader

1. Go to this page and download the library: Download zonneplan/laravel-module-loader 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/ */

    

zonneplan / laravel-module-loader example snippets

 php
'providers' => [
    Modules\User\UserServiceProvider::class
]
$xslt
app
├── Modules
    ├──MyModule
       ├──Config
       ├──Console
       ├──Database
          ├──Factories
          ├──Migrations
       ├──Exceptions
       ├──Http
          ├──Controllers
          ├──Middleware
          ├──Requests
          ├──Resources
       ├──Resources
          ├──lang
          ├──views
       ├──Routes
          ├──web.php            
          ├──api.php            
          ├──channels.php       
          ├──console.php        
       ├──MyModuleServiceProvider.php
       ├──tests
 php
// In a controller
view('user::index');

// In a blade file
@
 php
protected $middleware = [
    'my-middleware' => MyMiddleware::class,
];
 php
protected $subscribe = [
    MySubscriber::class
];