Skip to content

Commit 736128d

Browse files
Merge branch 'Laravel-Backpack:main' into button-cmd
2 parents 93b0d96 + ad4f3a4 commit 736128d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/Console/Commands/CrudControllerBackpackCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ public function handle()
4949
{
5050
$name = $this->qualifyClass($this->getNameInput());
5151
$path = $this->getPath($name);
52+
$relativePath = Str::of($path)->after(base_path())->trim('\\/');
5253

53-
$this->progressBlock("Creating ${name}CrudController");
54+
$this->progressBlock("Creating Controller <fg=blue>$relativePath</>");
5455

5556
// Next, We will check to see if the class already exists. If it does, we don't want
5657
// to create the class and overwrite the user's code. So, we will bail out so the

src/Console/Commands/CrudModelBackpackCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ public function handle()
5656
$name = $this->getNameInput();
5757
$namespaceApp = $this->qualifyClass($this->getNameInput());
5858
$namespaceModels = $this->qualifyClass('/Models/'.$this->getNameInput());
59+
$relativePath = Str::of("$namespaceModels.php")->lcfirst()->replace('\\', '/');
5960

60-
$this->progressBlock("Creating $namespaceModels");
61+
$this->progressBlock("Creating Model <fg=blue>$relativePath</>");
6162

6263
// Check if exists on app or models
6364
$existsOnApp = $this->alreadyExists($namespaceApp);
@@ -97,7 +98,7 @@ public function handle()
9798
// As the class already exists, we don't want to create the class and overwrite the
9899
// user's code. We just make sure it uses CrudTrait. We add that one line.
99100
if (! $this->hasOption('force') || ! $this->option('force')) {
100-
$this->progressBlock('Adding CrudTrait to model');
101+
$this->progressBlock('Adding CrudTrait to the Model');
101102

102103
$file = $this->files->get($path);
103104
$lines = preg_split('/(\r\n)|\r|\n/', $file);

src/Console/Commands/CrudRequestBackpackCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Backpack\Generators\Console\Commands;
44

55
use Illuminate\Console\GeneratorCommand;
6+
use Illuminate\Support\Str;
67

78
class CrudRequestBackpackCommand extends GeneratorCommand
89
{
@@ -47,8 +48,9 @@ public function handle()
4748
{
4849
$name = $this->qualifyClass($this->getNameInput());
4950
$path = $this->getPath($name);
51+
$relativePath = Str::of($path)->after(base_path())->trim('\\/');
5052

51-
$this->progressBlock("Creating ${name}Request");
53+
$this->progressBlock("Creating Request <fg=blue>$relativePath</>");
5254

5355
// Next, We will check to see if the class already exists. If it does, we don't want
5456
// to create the class and overwrite the user's code. So, we will bail out so the

0 commit comments

Comments
 (0)