Skip to content

Commit 5bfd7ae

Browse files
authored
Merge pull request #149 from Laravel-Backpack/remove-lcfirst-calls
remove l8 breaking code
2 parents d85e527 + 89e0d3f commit 5bfd7ae

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Console/Commands/CrudModelBackpackCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ 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('\\', '/');
59+
$relativePath = lcfirst(Str::of("$namespaceModels.php")->replace('\\', '/'));
6060

6161
$this->progressBlock("Creating Model <fg=blue>$relativePath</>");
6262

src/Console/Commands/PageControllerBackpackCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Console\GeneratorCommand;
66
use Illuminate\Support\Str;
7+
use Illuminate\Support\Stringable;
78

89
class PageControllerBackpackCommand extends GeneratorCommand
910
{
@@ -84,7 +85,7 @@ public function handle()
8485
/**
8586
* Get the desired class name from the input.
8687
*
87-
* @return string
88+
* @return Stringable
8889
*/
8990
protected function getNameInput()
9091
{
@@ -158,7 +159,7 @@ protected function replaceNameStrings(&$stub)
158159
$name = $this->getNameInput();
159160

160161
$stub = str_replace('DummyName', $name, $stub);
161-
$stub = str_replace('dummyName', $name->lcfirst(), $stub);
162+
$stub = str_replace('dummyName', lcfirst($name), $stub);
162163
$stub = str_replace('Dummy Name', $name->kebab()->replace('-', ' ')->title(), $stub);
163164

164165
return $this;

0 commit comments

Comments
 (0)