Learner\Http\Controllers\Auth\AuthController::postRegister PHP Method

postRegister() public method

Handle a registration request for the application.
public postRegister ( ) : Illuminate\Http\Response
return Illuminate\Http\Response
    public function postRegister()
    {
        $form = $this->users->getRegisterForm();
        if (!$form->isValid()) {
            return $this->redirectBack(['errors' => $form->getErrors()]);
        }
        Auth::login($this->create($form->getInputData()));
        flashy()->message(lang('notification.register', 'Register Successfully!'));
        return $this->redirectIntended('/');
    }