Skip to content

Commit

Permalink
Update table name on ForeignIdColumnDefinition.php
Browse files Browse the repository at this point in the history
  • Loading branch information
granitibrahimi authored Oct 13, 2024
1 parent 1d7e000 commit 84d8834
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(Blueprint $blueprint, $attributes = [])
*/
public function constrained($table = null, $column = 'id', $indexName = null)
{
return $this->references($column, $indexName)->on($table ?? Str::of($this->name)->beforeLast('_'.$column)->plural());
return $this->references($column, $indexName)->on($table ?? $this->blueprint->getTable());
}

/**
Expand Down

0 comments on commit 84d8834

Please sign in to comment.