Skip to content

Commit f596f59

Browse files
committed
Replace depreciated helpers.
1 parent 0c8895b commit f596f59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Commands/Repository.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Davinet\ArtisanCommand\Commands;
44

55
use Illuminate\Console\Command;
6+
use Illuminate\Support\Arr;
67
use Illuminate\Support\Str;
78

89
class Repository extends Command
@@ -73,7 +74,7 @@ protected function replaceClassName($name, $stub)
7374
*/
7475
protected function replacePropertyName($name, $stub)
7576
{
76-
$property = lcfirst(camel_case($name));
77+
$property = lcfirst(Str::camel($name));
7778
return str_replace('DummyProperty', $property, $stub);
7879
}
7980

@@ -125,7 +126,7 @@ protected function putInFile($filename, $content)
125126
protected function setModelAndNamespace(&$model, &$namespace)
126127
{
127128
$exploded = explode('\\', $model);
128-
$model = array_last($exploded);
129+
$model = Arr::last($exploded);
129130
$namespace = '';
130131

131132
for ($i = 0; $i < count($exploded) - 1; $i++)

0 commit comments

Comments
 (0)