Skip to content

Commit

Permalink
Merge pull request #36 from yepwoo/dev
Browse files Browse the repository at this point in the history
somehow config is not working, base_path used instead
  • Loading branch information
mahmoodahmad100 authored Apr 23, 2024
2 parents f80683e + 3d8ec4f commit e5f690a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ModuleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function register()
$this->mergeConfigFrom(__DIR__ . '/config.php', 'laragine');

module_autoloader();
module_autoloader('Plugins', config('laragine.plugins_dir'));
module_autoloader('Plugins', base_path() . '/plugins');

if (class_exists('Core\\Base\\ModuleServiceProvider')) {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

if (!class_exists(SendResponse::class, false)) {
module_autoloader();
module_autoloader('Plugins', config('laragine.plugins_dir'));
module_autoloader('Plugins', base_path() . '/plugins');
}

trait Handler
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function client_validation_response($validations, &$start_code = 4101)
*/
function module_autoloader($namespace = 'Core', $dir = '')
{
$dir = empty($dir) ? config('laragine.root_dir') : $dir;
$dir = empty($dir) ? base_path() . '/core' : $dir;

// instantiate the loader
$loader = new \Yepwoo\Laragine\Support\Psr4AutoloaderClass;
Expand Down

0 comments on commit e5f690a

Please sign in to comment.