Skip to content

Commit 788189f

Browse files
authored
Merge pull request #168 from Laravel-Backpack/replace-value-tostring
Replaced Stringable value with toString()
2 parents 967d6b9 + cecedf7 commit 788189f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Console/Commands/PageControllerBackpackCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ protected function replaceNameStrings(&$stub)
159159
{
160160
$name = $this->getNameInput();
161161

162-
$stub = str_replace('DummyName', $name->value, $stub);
163-
$stub = str_replace('dummyName', lcfirst($name->value), $stub);
162+
$stub = str_replace('DummyName', (string) $name, $stub);
163+
$stub = str_replace('dummyName', lcfirst((string) $name), $stub);
164164
$stub = str_replace('Dummy Name', $name->kebab()->replace('-', ' ')->title(), $stub);
165165

166166
return $this;

src/Console/Commands/Views/PublishOrCreateViewBackpackCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,6 @@ protected function getNameInput()
136136
$name = $from->afterLast('/')->afterLast('\\');
137137
}
138138

139-
return $name->trim()->snake('_')->value;
139+
return (string) $name->trim()->snake('_');
140140
}
141141
}

0 commit comments

Comments
 (0)