Skip to content
This documentation is in construction.

Write your own

A module is a standard Laravel Service Provider that additionally implements the Epsicube\Support\Contracts\Module interface.

This contract provides the metadata Epsicube needs to register, identify, and manage your module.


  1. Generate a new provider using Laravel’s CLI:

    Terminal window
    php artisan make:provider MyCustomModule
  2. Update the provider to implement the Module interface:

    use Illuminate\Support\ServiceProvider;
    use Epsicube\Support\Contracts\Module;
    use Epsicube\Support\ModuleIdentity;
    class MyCustomModule extends ServiceProvider implements Module
    {
    public function identifier(): string
    {
    return 'my-custom-module';
    }
    public function identity(): ModuleIdentity
    {
    return ModuleIdentity::make(
    name: __('Your custom module'),
    version: 'dev-master',
    author: 'Your Team',
    description: '' // Optional
    );
    }
    // ... register()
    // ... boot()
    }
  3. Epsicube does not use Laravel’s default provider registration system.

    Remove the provider from:

    • bootstrap/providers.php
    • or config/app.php → providers

    Instead, register it in your module’s composer.json:

    "extra": {
    "epsicube": {
    "modules": [
    "App\\Providers\\MyCustomModule"
    ]
    }
    }
  4. Terminal window
    composer dump-autoload
    • Using the administration, or using the cli:
    Terminal window
    php artisan modules:enable my-custom-module # Use the specified identifier
  • Package Development — Learn how to create reusable packages with configuration, migrations, assets, and service providers.