class SocialController extends Controller
{
- protected $socialAuthService;
- protected $registrationService;
- protected $loginService;
+ protected SocialAuthService $socialAuthService;
+ protected RegistrationService $registrationService;
+ protected LoginService $loginService;
/**
* SocialController constructor.
SocialAuthService $socialAuthService,
RegistrationService $registrationService,
LoginService $loginService
- )
- {
- $this->middleware('guest')->only(['getRegister', 'postRegister']);
+ ) {
+ $this->middleware('guest')->only(['register']);
$this->socialAuthService = $socialAuthService;
$this->registrationService = $registrationService;
$this->loginService = $loginService;
}
$user = $this->registrationService->registerUser($userData, $socialAccount, $emailVerified);
+ $this->showSuccessNotification(trans('auth.register_success'));
$this->loginService->login($user, $socialDriver);
- $this->showSuccessNotification(trans('auth.register_success'));
return redirect('/');
}
}