📜  php artisan tinker 加密 cmd - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:06.275000             🧑  作者: Mango

代码示例1
>> php artisan tinker

$admin = new App\Admin;
$admin->name= "admin";
$admin->email="admin@admin.com";
$admin->password= Hash::make('password');
$admin->save();

Hash::make('new_password');
=> "$2y$10$mxpQR9NLHLqTnC0D8I0dmeQcXgwdKIuD9roPYjl.YMvsXCVVoRuXG"
>>> bcrypt('new_password');
=> "$2y$10$mxpQR9NLHLqTnC0D8I0dmeQcXgwGGm1112rDxwVrUP9boDaMuKE8i"