Answers for "laravel check if user and password match"

PHP
4

password match laravel

1. $user = User::where('email', request('email'))->first();
2. Hash::check(request('password'), $user->password);

This will return true or false based on whether or not the password matches.
Posted by: Guest on August-02-2020
0

how to make validate error when password doesnt match with password confirm laravel

// ...

$input = Input::all();

$rules = [
    'password' => 'required|min:8',
    'password_confirmation' => 'required|min:8|same:password',
];

$messages = [
    'password_confirmation.same' => 'Password Confirmation should match the Password',
];
$validator = Validator::make($input, $rules, $messages);

if ($validator->fails()) {
    return back()->withInput()->withErrors($validator->messages());
}
// ...
Posted by: Guest on October-19-2021

Code answers related to "laravel check if user and password match"

Browse Popular Code Answers by Language