laravel password hash code example
Example 1: laravel create password hash
$password = Hash::make('yourPa$$w0rd');
Example 2: bcrypt laravel
$password = bcrypt('secret');
Example 3: laravel hash
use Illuminate\Support\Facades\Hash;
Hash::make($newPassword);
if (Hash::check('plain-text', $hashedPassword)) {
}
Example 4: 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();
}
Example 5: laravel hash namespace
use Illuminate\Support\Facades\Hash;