I am trying to add a new item to my object but I get an error:
Here is my code:
$q = Question::where('id',$id -> id)->first();
$q[]=$q->push('test',5);
dd($q);
Here is what this return:
Missing argument 2 for Illuminate\Database\Eloquent\Model::setAttribute(), called in /home/client/public_html/storage/framework/compiled.php on line 10231 and defined
Any idea how to fix this?