Skip to content

[7.x] Add parameter to constrained() method - #31853

Merged
taylorotwell merged 4 commits into
laravel:7.xfrom
samuelhgf:7.x
Mar 9, 2020
Merged

taylorotwell merged 4 commits into
laravel:7.xfrom
samuelhgf:7.x

Conversation

@samuelhgf

Copy link
Copy Markdown
Contributor

This PR implements a possibility to the developer put the name of the table inside the constrained method. This feature helps in case of creating a foreign key using the constrained method but having a column name not expected by laravel convention.

@themsaid themsaid changed the title Add parameter to constrained() method [7.x] Add parameter to constrained() method Mar 9, 2020
/**
* Create a foreign key constraint on this column referencing the "id" column of the conventionally related table.
*
* @param string $table

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string|null

@taylorotwell
taylorotwell merged commit ea2daa0 into laravel:7.x Mar 9, 2020
salmanarshad321 pushed a commit to salmanarshad321/framework that referenced this pull request Sep 23, 2026
* Add parameter  to constrained() method

* Add parameter  to constrained() method

* Update ForeignIdColumnDefinition.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants