function getActivateAction(ActivateUser $activateUserCommand, Router $router, Users $eUsers, Response $response) { $rUser = $eUsers->where('activation', $router->get('activation'))->oneOrFail(new NotFound('User not found. Maybe it was already activated?')); return $activateUserCommand->setUser($rUser)->onSuccess(function () use($response) { $response->redirect('/auth/activated?succesful'); })->onError(function () { return view('vendor/lfw/auth/src/Pckg/Auth/View/activationFailed'); })->execute(); }