Skip to content

Commit

Permalink
Snake case basename
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmccreary committed Jan 15, 2025
1 parent 19763c5 commit 0d0d4f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Generators/MigrationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected function buildForeignKey(string $column_name, ?string $on, string $typ
} elseif (Str::contains($on, '.')) {
[$table, $column] = explode('.', $on);
} elseif (Str::contains($on, '\\')) {
$table = Str::lower(Str::plural(Str::afterLast($on, '\\')));
$table = Str::snake(Str::plural(Str::afterLast($on, '\\')));
$column = Str::afterLast($column_name, '_');
} else {
$table = Str::snake(Str::plural($on));
Expand Down

0 comments on commit 0d0d4f7

Please sign in to comment.