设置哈希密码laravel 5.1 [英] Make hash password laravel 5.1

查看:101
本文介绍了设置哈希密码laravel 5.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此输入密码哈希值对我的应用程序有问题.

I have problem to my apps this input password hash.

    $simpan['password']=Request::input('password');

如何在我的代码中进行哈希处理?

how make hash in my code?

推荐答案

您有两个选择

在Hash外观上调用make方法 Hash::make('string_here')

Call make method on Hash facade Hash::make('string_here')

或使用全局帮助器功能bcrypt('string_here')

Or use global helper function bcrypt('string_here')

示例:

//Hash facade example
$simpan['password']= Hash::make(Request::input('password'));

//bcrypt global helper function
$simpan['password']= bcrypt(Request::input('password'));

资源:

https://laravel.com/docs/5.1/hashing

这篇关于设置哈希密码laravel 5.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆