|
@@ -34,7 +34,7 @@ class UserTax extends Model
|
|
|
{
|
|
|
self::afterWrite(function (self $tax){
|
|
|
if(!empty($tax['is_default'])){
|
|
|
- self::where('user_id',$tax['user_id'])->where('id','<>',$tax['id'])->update(['is_default'=>1]);
|
|
|
+ self::where('user_id',$tax['user_id'])->where('id','<>',$tax['id'])->update(['is_default'=>0]);
|
|
|
}
|
|
|
});
|
|
|
}
|