Skip to content

Commit 7184d01

Browse files
Update src/Generators/EntityGenerator.php
1 parent 8c88a9a commit 7184d01

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Generators/EntityGenerator.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,12 @@ protected function pathToNamespace(string $name): string
309309
return ucwords(Str::replace('/', '\\', $name), '\\');
310310
}
311311

312-
protected function getRelationName(
313-
string $relation,
314-
string $type,
315-
array $pluralRelations = ['belongsToMany', 'hasMany'],
316-
): string {
312+
protected function getRelationName(string $relation, string $type): string
313+
{
317314
$relationName = Str::snake($relation);
318315

316+
$pluralRelations = ['belongsToMany', 'hasMany'];
317+
319318
if (in_array($type, $pluralRelations)) {
320319
$relationName = Str::plural($relationName);
321320
}

0 commit comments

Comments
 (0)