标签: laravel collections merge eloquent
如何将Eloquent集合与单个项目合并?尝试合并会导致错误:
Call to a member function getKey() on boolean
答案 0 :(得分:0)
您应该使用Collection的push方法:
push
$collection = new Collection; $collection->push($item);