Answer the question
In order to leave comments, you need to log in
Why might the route 'login' not defined error pop up?
In general, I started watching videos on laracasts, and there is an example of authorization, and I began to repeat it. I have a [email protected]() where a new user registers
$user = User::create([
'name' => $request['name'],
'email' => $request['email'],
...
])
auth()->login($user);
$id = auth()->id();
return redirect()->route('home', ['id' => $id]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question