1. Go to this page and download the library: Download glugox/module 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/ */
glugox / module example snippets
use Glugox\Module\Module;
use App\Providers\BillingServiceProvider;
class BillingModule extends Module
{
public function id(): string { return 'company/billing'; }
public function name(): string { return 'Billing'; }
public function description(): string { return 'Invoices and payments'; }
public function version(): string { return '1.0.0'; }
public function capabilities(): array { return ['http:web', 'http:api']; }
public function serviceProvider(): string
{
return BillingServiceProvider::class;
}
public function routesPath(): ?string
{
return __DIR__ . '/routes/web.php';
}
}