I am using spatie to assign and give permissions to user roles.
I need to update the role_id column in model_has_roles table.
I tried using eloquent but unfortunately there is no model for the tables created under the spatie migrations.
Right now I am using the below function to update:
$user_role = DB::table('model_has_roles')
->where('model_id', '=', $request->userid)
->select('model_has_roles.*')
->get();
$user_role->role_id = $request->userid;
$user_role->save();
But this says that "Method save does not exist"
Any advice on how to update the database column?