Laravel Model Bulk Update – Builder::cleanBindings() must be of the type array, null given

Discovered that changing the code to the following solved the issue

Vue Component

axios.put('/api/maintain/bulk', {
          'ids': this.data,
          'date': this.last
        })...

Maintenance Controller

public function bulkupdate(Request $request){
    Maintain::whereIn('id', $request->ids)->update(['start' => $request->date]);
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top