设置哈希密码laravel

设置哈希密码laravel

本文介绍了设置哈希密码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 facadeHash::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'));

资源:

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

08-13 16:51