Skip to content

Commit

Permalink
Trim leading slash from namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidesu committed Nov 8, 2015
1 parent 62f368c commit ec89227
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Console/Stubs/seeder.stub
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace {{namespace}}{{name}}\Database\Seeds;
namespace {{namespace}}\{{name}}\Database\Seeds;

use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
Expand Down
2 changes: 1 addition & 1 deletion src/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function registerServiceProvider($properties)
{
$module = studly_case($properties['slug']);
$file = $this->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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ protected function getManifestPath($module)
*/
public function getNamespace()
{
return $this->config->get('modules.namespace');
return rtrim($this->config->get('modules.namespace'), '/\\');
}
}

3 comments on commit ec89227

@maengkom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php artisan module:seed --database=myconnection article no longer works. Because of this change ? How to check it ?

@kaidesu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look; in the future please submit a bug report so I can easily keep tabs on things like this!

@kaidesu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maengkom this has been fixed in v2.1.9

Please sign in to comment.