Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperTey committed Nov 16, 2024
1 parent 36af4eb commit 482dc12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/Commands/DomainModelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ protected function createBaseModelIfNeeded()

$domain = DomainResolver::guessDomainFromClass($baseModel);

$name = Str::after($baseModel, $domain);
$name = str($baseModel)
->after($domain)
->replace(['\\', '/'], '/')
->toString();

$this->call(DomainBaseModelMakeCommand::class, [
'--domain' => $domain,
Expand Down
6 changes: 4 additions & 2 deletions src/Commands/DomainViewModelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Lunarstorm\LaravelDDD\Commands;

use Illuminate\Support\Str;
use Lunarstorm\LaravelDDD\Commands\Concerns\HasDomainStubs;
use Lunarstorm\LaravelDDD\Support\DomainResolver;

Expand Down Expand Up @@ -55,7 +54,10 @@ public function handle()

$domain = DomainResolver::guessDomainFromClass($baseViewModel);

$name = Str::after($baseViewModel, $domain);
$name = str($baseViewModel)
->after($domain)
->replace(['\\', '/'], '/')
->toString();

$this->call(DomainBaseViewModelMakeCommand::class, [
'--domain' => $domain,
Expand Down

0 comments on commit 482dc12

Please sign in to comment.