Well I have this in my repository, allowing values to be set to null when there is no contents
foreach($data as $key => $value)
{
$model->$key = ($value != '') ? $value : null;
}
$model->save();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community