Skip to content

ModularousProvider ​

Class: Unusualify\Modularous\Providers\ModularousProvider
Source: src/Providers/ModularousProvider.php
Extends: ServiceProvider

The single entry point for the entire Modularous package. Registers all internal and third-party providers in the correct order. Only this provider needs to be added to config/app.php.

Provider Boot Order ​

php
protected $providers = [
    // Third-party
    GeoIPServiceProvider::class,
    TimezoneServiceProvider::class,

    // Modularous internals
    BaseServiceProvider::class,
    ModuleServiceProvider::class,
    RouteServiceProvider::class,
    AuthServiceProvider::class,
    CoverageServiceProvider::class,
];
OrderProviderPurpose
1GeoIPServiceProviderIP geolocation via torann/geoip
2TimezoneServiceProviderTimezone support via camroncade/timezone
3BaseServiceProviderCore bindings, commands, macros, view composers
4ModuleServiceProviderPer-module boot (migrations, views, lang, commands)
5RouteServiceProviderSystem and module routing
6AuthServiceProviderGates, Horizon auth, email verification
7CoverageServiceProviderCode-coverage analysis bindings

Methods ​

register() ​

Iterates $providers and calls $this->app->register($provider) for each. No direct bindings are made here — all container registrations are delegated to the individual providers.

boot() ​

Runs the booted callback when exceptionalRunningInConsole() is true (i.e., the application is running in a console context that should behave like a web request). Currently a no-op placeholder for post-boot console initialisation.

Registration ​

php
// config/app.php
'providers' => [
    Unusualify\Modularous\Providers\ModularousProvider::class,
],