Answers for "laravel encrypt password"

PHP
8

laravel create password hash

$password = Hash::make('yourPa$$w0rd');
Posted by: Guest on May-15-2020
0

laravel password encryption

$password = Hash::make('secret');
Posted by: Guest on April-24-2021
0

laravel hash password check

$data = User::find($id);
if( ! Hash::check( $data->password , Input::get('currPassword') ) )
{
    return Redirect::to('/admin/profile')
        ->with('message', 'Current Password Error !')
        ->withInput();
}
Posted by: Guest on December-10-2020
0

laravel auth reset password

<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\User;
use Hash;

class RegisterController extends Controller
{
  public function register()
  {

    return view('auth.register');
  }

  public function storeUser(Request $request)
  {
      $request->validate([
          'name' => 'required|string|max:255',
          'email' => 'required|string|email|max:255|unique:users',
          'password' => 'required|string|min:8|confirmed',
          'password_confirmation' => 'required',
      ]);

      User::create([
          'name' => $request->name,
          'email' => $request->email,
          'password' => Hash::make($request->password),
      ]);

      return redirect('login');
  }

}
Posted by: Guest on August-08-2020

Browse Popular Code Answers by Language