Hi I am new to laravel and fantastically stuck at saving a child table of 1:M relashtip basically I have 2 models dataset which and table_blacklist 1 dataset
can have many table_blacklist
now when I trying update a value of the table_blacklist
it gives error
Call to undefined method Illuminate\Database\Eloquent\Collection::save()
the below function is in my dataset model(parent)
public function updateTable($id){
$table_blacklist = $this->table_blacklist()->find($id); //table_blacklist::find($id);
$table_blacklist->blacklisted =true;
$table_blacklist->save();
}