Skip to content

Commit

Permalink
add helpers loader
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed Sep 12, 2023
1 parent b06bc6e commit 617c011
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Core/ServiceProvider.php
Expand Up @@ -24,13 +24,28 @@ public function __construct($app)
parent::__construct($app);

// Modulator Loaders
$this->loadHelpers();
$this->loadConfig();
$this->loadViews();
$this->loadMigrations();
$this->registerCommands();
$this->loadTranslations();
}

/**
* Load Module Helpers.
*
* @return void
*/
protected function loadHelpers()
{
if (!static::$module) return;

if (file_exists($helpers = module_path(static::$module, 'helpers.php'))) {
require $helpers;
}
}

/**
* Load Module Configrations.
*
Expand Down

0 comments on commit 617c011

Please sign in to comment.