-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.x] add ability to disable relationships in factories (#53450)
* add ability to disable relationships sometimes when `make`ing or `create`ing a model, we don't actually care about the relationship. this new property and method allow us to turn them all off at once. when disabled, any attribute that is assigned a factory will instead return `null`. * change method name per @taylorotwell * rename property and invert logic * persist `withoutRelationships` across new statics * refactor * Update Factory.php --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
- Loading branch information
1 parent
6a491c2
commit 038cde3
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters