Skip to content

Commit

Permalink
Merge pull request #205 from siberfxweb/patch-1
Browse files Browse the repository at this point in the history
Update CrudBackpackCommand.php
  • Loading branch information
pxpm authored Apr 3, 2024
2 parents 996a09a + 05b7cd2 commit 6096cbb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Console/Commands/CrudBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ public function handle()
$this->call('route:cache');
}

$url = Str::of(config('app.url'))->finish('/')->append('admin/')->append($nameKebab);
$routePrefix = config('backpack.base.route_prefix');

$url = Str::of(config('app.url'))
->finish('/')
->when($routePrefix !== '', function ($string) use ($routePrefix) {
return $string->append($routePrefix)->finish('/');
})
->append($nameKebab);

$this->newLine();
$this->line(" Done! Go to <fg=blue>$url</> to see the CRUD in action.");
Expand Down

0 comments on commit 6096cbb

Please sign in to comment.