How does Laravel query records through association
Xiaobian to share with you how Laravel through the association query records, I believe most people do not know how, so share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!
Query records by association
In hasMany, you can query records whose association must be greater than 5.
$posts = Post::has ('comment ', '>', 5)->get(); The above is "Laravel how to record by association query" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!