我想从我的文章模型中获得文章,并以角度检索它,我很难从八进制中获得带有"featured_images“的子键。article->featured_images as $image) { }}
但是,如果删除foreach($article->featured_images as $image) { }部分,就不会得到$listarr的"featured_images“。,在$
我需要获得基于belongsToMany关系的所有记录的计数。通常,我可以在模型内部的函数中使用groupBy()。class)->Count();
//output is 4(array) user records. ...it给了我数据,但是像用户的4用户数据是无用的。对于这些记录,唯一需要的就是totalCount。