hmm doesn't sound that bad. Here are my quick thoughts.
First create your own "AuthController". This is going to be your main item here. You will want this to do the heavy lifting. All you really need is the one function, and you can refactor it as you please.
public function login()
{
$ip = $_SERVER['REMOTE_ADDR'];
$result = shell_exec('something');
$user = User::where('id', $result)->first();
if(! $user) {
return 'user not found in usertable';
}
auth()->login($user); // or \Auth::login($user);
return redirect()->route('home');
}
Anyway first thoughts, so the login goes to that "route" and it would handle the informtion.
Thank you, it was not so hard as I thought, I created an AuthController based on your sketch, and it works perfectly.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community