[英]How I fetch the data in Laravel using one foreign key in one table at multiple times?
You have to create a relationship between the two tables in your Modal.您必须在 Modal 中的两个表之间创建关系。 This will let you directly access all the values that are in relation to that particular Modal.
这将让您直接访问与该特定模态相关的所有值。
To know how it works check out Eloquent-Relationships要了解它是如何工作的,请查看Eloquent-Relationships
You can also check out this tutorialLaracast-Foreign-Keys (Highly recommended for understanding)你也可以看看这个教程Laracast-Foreign-Keys (强烈推荐理解)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.