Answer the question
In order to leave comments, you need to log in
How can I prevent the user from logging in immediately after registering?
Here is the standard function: $this->auth->login($this->registrar->create($request->all()));
As I understand it, she registers a new user and immediately logs in. I only need registration so far
Tried $this->registrar->create($request->all());
But error: Trying to get property of non-object.
Answer the question
In order to leave comments, you need to log in
Try to define the $this->auth and $this->registrar objects beforehand in the constructor
public function __construct(Guard $auth, Registrar $registrar)
{
$this->auth = $auth;
$this->registrar = $registrar;
}
$this->registrar->create($request->all());
should work separately Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question