Laravel 7 factories had method afterCreatingState() where you could define what should happen after Model with specific state was saved into database.
$factory->afterCreatingState(App\User::class, 'active', function ($user, $faker) {
// ...
});
Laravel 8 factories don't have this method, instead there is only general afterCreating().
public function configure()
{
return $this->afterCreating(function (User $user) {
//
});
}
How to achieve this behavior?