Skip to content

Helper Functions ​

Modularous ships 15 PHP helper files, loaded globally via BaseServiceProvider::registerHelpers() using a glob over src/Helpers/*.php. All functions are wrapped in function_exists() guards so host apps can override any helper.

Files Overview ​

FileFunctionsPurpose
array.php11Deep-merge, export, and transform arrays
column.php3Table column configuration and translation hydration
component.php5Vue modal/component config builders
composer.php8Composer package introspection and env utilities
connector.php8Module connector system entrypoints
db.php1Database existence check
format.php45+String, class, code-generation, and data helpers
front.php5Frontend URL and SVG symbol helpers
i18n.php7Translation and language data helpers
input.php7Form input processing, hydration, and extension
media.php3File size formatting and filename sanitization
migrations.php8Blueprint schema field presets
module.php18Module context, config, permission, and debug helpers
router.php3Route resolution and URL query helpers
sources.php14Application data for Inertia: navigation, auth, localization

How Helpers Are Loaded ​

php
// BaseServiceProvider
protected function registerHelpers(): void
{
    foreach (glob(__DIR__ . '/../Helpers/*.php') as $file) {
        require_once $file;
    }
}

All helpers are available in controllers, views, Blade templates, and anywhere in the Laravel request lifecycle after the service provider has booted.