我有一个laravel应用程序,我试图在主索引页面上显示所有用户的所有帖子。然而,我在尝试查询所有用户的所有帖子时遇到了问题。下面的代码只获取第一个用户的所有帖子。下面是查询 //grab all users from the database and store it in the users variable//graball users. list by most recent in descending orde
我们的laravel应用程序的数据库也在增加,查询时间也在增加。关于查询,我注意到的一件事是,whereIn()比relations调用快得多。now i can access all consignments$customer->consignments但即使在使用索引时(也许我没有正确地使用索引)$customer_ids = Cu
基本上,我在Laravel中有一个路由系统,它传递一个可选的高级标记名,用于从数据库集合中检索标签列表(我正在使用MongoDB),然后依次使用该标记列表从另一个集合检索数据。$tags = array();
//get an array of tags from db->whereIn("tags", $tags //<-- an array of tags)
-&g