1. Go to this page and download the library: Download sinemacula/laravel-modules 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/ */
sinemacula / laravel-modules example snippets
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use SineMacula\Laravel\Modules\Application;
use SineMacula\Laravel\Modules\Configuration\Modules;
Modules::setBasePath(dirname(__DIR__));
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
api : Modules::routePaths(),
health : '/health',
apiPrefix: '',
)
->withMiddleware(function (Middleware $middleware): void {})
->withExceptions(function (Exceptions $exceptions): void {})
->create();