|
2 | 2 |
|
3 | 3 | namespace Bitfumes\Multiauth\Console\Commands; |
4 | 4 |
|
| 5 | +use Illuminate\Support\Str; |
5 | 6 | use Illuminate\Console\Command; |
6 | 7 | use Illuminate\Container\Container; |
7 | 8 |
|
@@ -166,7 +167,7 @@ protected function removeMigration() |
166 | 167 | $migration_path = database_path('migrations'); |
167 | 168 | $files = glob("{$migration_path}/*.php"); |
168 | 169 | foreach ($files as $file) { |
169 | | - if (str_contains($file, "create_{$guard}_table")) { |
| 170 | + if (Str::contains($file, "create_{$guard}_table")) { |
170 | 171 | unlink($file); |
171 | 172 | } |
172 | 173 | } |
@@ -244,14 +245,14 @@ protected function parseName($name = null) |
244 | 245 | } |
245 | 246 |
|
246 | 247 | return [ |
247 | | - '{{pluralCamel}}' => str_plural(camel_case($name)), |
248 | | - '{{pluralSlug}}' => str_plural(str_slug($name)), |
249 | | - '{{pluralSnake}}' => str_plural(snake_case($name)), |
250 | | - '{{pluralClass}}' => str_plural(studly_case($name)), |
251 | | - '{{singularCamel}}' => str_singular(camel_case($name)), |
252 | | - '{{singularSlug}}' => str_singular(str_slug($name)), |
253 | | - '{{singularSnake}}' => str_singular(snake_case($name)), |
254 | | - '{{singularClass}}' => str_singular(studly_case($name)), |
| 248 | + '{{pluralCamel}}' => Str::plural(camel_case($name)), |
| 249 | + '{{pluralSlug}}' => Str::plural(Str::slug($name)), |
| 250 | + '{{pluralSnake}}' => Str::plural(snake_case($name)), |
| 251 | + '{{pluralClass}}' => Str::plural(studly_case($name)), |
| 252 | + '{{singularCamel}}' => Str::singular(camel_case($name)), |
| 253 | + '{{singularSlug}}' => Str::singular(Str::slug($name)), |
| 254 | + '{{singularSnake}}' => Str::singular(snake_case($name)), |
| 255 | + '{{singularClass}}' => Str::singular(studly_case($name)), |
255 | 256 | '{{namespace}}' => $this->getNamespace(), |
256 | 257 | ]; |
257 | 258 | } |
|
0 commit comments