I am trying to make a more secure version of Laravels included authentication system, by adding a salt to the passwords. But i don't know how to use a custom authentication function. I made one and it looks like this:
public function authenticate(Request $request)
{
$user = User::where('email', $request->email)->first();
$password = bcrypt($request->password . $user->salt);
if (Auth::attempt(['email' => $request->email, 'password' => $password])) {
return redirect()->intented();
}
}
I tried doing this from Laravels documentation (5.2)
So to specify it: I can't add a salt to Laravels Auth system, i tried doing it with the function above, but i do not know how to use it?
So can you please help me?