Level 1
awesome bro this works like a charm.
Be part of JetBrains PHPverse 2026 on June 9 β a free online event bringing PHP devs worldwide together.
Hi, as title suggests, is there a way to login to the child project if parent project is logged in? Looking to optimize my code since it's shoddy as it is.
On Parent project, I have this link to the child project
// Parent Project Blade:
<a href="http://child-project.test/authenticate/{{ auth()->user()->email }}"> Access Child Site </a> //GET request to child-project
// Child's Authenticate Function:
public function auth(Request $req)
{
$user = User::where('email', $req->email)->first();
Auth::login($user);
return redirect('/');
}
This is currently on a GET request, if I can use redirect() with POST that would be better. Or if I can skip the authentication on the child project and just use parent's session.
Please or to participate in this conversation.