We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98dd563 commit 05b7cd2Copy full SHA for 05b7cd2
src/Console/Commands/CrudBackpackCommand.php
@@ -78,12 +78,14 @@ public function handle()
78
$this->call('route:cache');
79
}
80
81
- $url = Str::of(config('app.url'))->finish('/')
82
- ->append(
83
- (!empty(config('backpack.base.route_prefix'))
84
- ? config('backpack.base.route_prefix') . '/'
85
- : '') . $nameKebab
86
- );
+ $routePrefix = config('backpack.base.route_prefix');
+
+ $url = Str::of(config('app.url'))
+ ->finish('/')
+ ->when($routePrefix !== '', function ($string) use ($routePrefix) {
+ return $string->append($routePrefix)->finish('/');
87
+ })
88
+ ->append($nameKebab);
89
90
$this->newLine();
91
$this->line(" Done! Go to <fg=blue>$url</> to see the CRUD in action.");
0 commit comments