Skip to content

Commit

Permalink
Fixed namespace getter
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Jun 14, 2024
1 parent e2d70e2 commit 0efdb1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/HelperGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use DragonCode\Support\Facades\Helpers\Str;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Str as IS;
use LaravelLang\Config\Facades\Config;

class HelperGenerator
Expand Down Expand Up @@ -51,7 +52,7 @@ protected function getProperties(): string

protected function getNamespace(): string
{
return dirname($this->class);
return IS::beforeLast($this->class, '\\');
}

protected function getName(): string
Expand Down

0 comments on commit 0efdb1e

Please sign in to comment.