Answers for "see hash password laravel"

PHP
0

laravel hash check password, Verifying That A Password Matches A Hash

<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;

class PasswordController extends Controller
{
    /**
     * Update the password for the user.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request)
    {
        // Validate the new password length...

        $request->user()->fill([
            'password' => Hash::make($request->newPassword)
        ])->save();
    }
}
Posted by: Guest on April-02-2021
0

Laravel create password hash

$password = Input::get('passwordformfield'); // password is form field
$hashed = Hash::make($password);
Posted by: Guest on July-11-2021

Browse Popular Code Answers by Language