Skip to content

Commit 867a233

Browse files
authored
Merge pull request #198 from Laravel-Backpack/remove-function-value-from-old-codebase
dont use Str value() function unavailable in Laravel 8
2 parents 34000db + d6447ee commit 867a233

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Console/Commands/BuildBackpackCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ private function getModels(string $path): array
8383

8484
// Try to load it from file content
8585
$fileContent = Str::of(file_get_contents($filepath));
86-
$namespace = $fileContent->match('/namespace (.*);/')->value();
87-
$classname = $fileContent->match('/class (\w+)/')->value();
86+
$namespace = (string) $fileContent->match('/namespace (.*);/');
87+
$classname = (string) $fileContent->match('/class (\w+)/');
8888

8989
$result = $this->validateModelClass("$namespace\\$classname");
9090
if ($result) {

0 commit comments

Comments
 (0)