Closed rayronvictor closed 4 years ago
$this->save() shouldn't be after $this->setAttribute('is_active', false);?
$this->save()
$this->setAttribute('is_active', false);
https://github.com/cybercog/laravel-eloquent-flag/blob/504bbd7e16d33c0eed12441cec51f3e92d8a50a1/src/Traits/Classic/HasActiveFlagHelpers.php#L41-L47
v5.1.1 has been released with your fix.
Now I see that tests are written incorrectly. We are not taking fresh records before assertions.
$this->save()
shouldn't be after$this->setAttribute('is_active', false);
?https://github.com/cybercog/laravel-eloquent-flag/blob/504bbd7e16d33c0eed12441cec51f3e92d8a50a1/src/Traits/Classic/HasActiveFlagHelpers.php#L41-L47