From ec89227af671362f1c3c0460a4f7ddab13b90dec Mon Sep 17 00:00:00 2001 From: Shea Lewis Date: Sat, 7 Nov 2015 17:05:46 -0800 Subject: [PATCH] Trim leading slash from namespace --- src/Console/Stubs/seeder.stub | 2 +- src/Modules.php | 2 +- src/Repositories/Repository.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Console/Stubs/seeder.stub b/src/Console/Stubs/seeder.stub index 4160dc03..8d24a0f4 100644 --- a/src/Console/Stubs/seeder.stub +++ b/src/Console/Stubs/seeder.stub @@ -1,5 +1,5 @@ repository->getPath()."/{$module}/Providers/{$module}ServiceProvider.php"; - $namespace = $this->repository->getNamespace().$module."\\Providers\\{$module}ServiceProvider"; + $namespace = $this->repository->getNamespace()."\\".$module."\\Providers\\{$module}ServiceProvider"; $this->app->register($namespace); } diff --git a/src/Repositories/Repository.php b/src/Repositories/Repository.php index 5fddb0f5..603f5568 100644 --- a/src/Repositories/Repository.php +++ b/src/Repositories/Repository.php @@ -110,6 +110,6 @@ protected function getManifestPath($module) */ public function getNamespace() { - return $this->config->get('modules.namespace'); + return rtrim($this->config->get('modules.namespace'), '/\\'); } }