Skip to content

Commit 6096cbb

Browse files
authored
Merge pull request #205 from siberfxweb/patch-1
Update CrudBackpackCommand.php
2 parents 996a09a + 05b7cd2 commit 6096cbb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Console/Commands/CrudBackpackCommand.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,14 @@ public function handle()
7878
$this->call('route:cache');
7979
}
8080

81-
$url = Str::of(config('app.url'))->finish('/')->append('admin/')->append($nameKebab);
81+
$routePrefix = config('backpack.base.route_prefix');
82+
83+
$url = Str::of(config('app.url'))
84+
->finish('/')
85+
->when($routePrefix !== '', function ($string) use ($routePrefix) {
86+
return $string->append($routePrefix)->finish('/');
87+
})
88+
->append($nameKebab);
8289

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

0 commit comments

Comments
 (0)