Hash :: make not working route.php文件

前端之家收集整理的这篇文章主要介绍了Hash :: make not working route.php文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的新laravel 4应用程序中遇到了auth问题.
我注意到的一件奇怪的事情,这可能是为什么当我这样做时:
var_dump(Hash::check('secret',Hash::make('secret')));

在DB播种机(我创建我的哈希密码)我得到了真实.

当我直接在路线中运行相同的命令时,我得到了错误.

另外,当我做一个简单的事情时:

var_dump(Hash::make('secret'));

直接在路线上它仍然是假的.

这个坏了还是我遗失了什么?

您的安装有问题.这就是我得到的:
Route::get('/',function()
{
    var_dump(Hash::make('secret'));  // Gives a bcrypt string output
    var_dump(Hash::check('secret',Hash::make('secret'))); // Output true
}

你做过作曲家更新,忘了更新应用程序本身吗?这是目前Laravel 4问题最常见的原因.

This forum post详细解答了如何在作曲家更新后更新主L4应用程序.

编辑:我会在这里发布论坛内容 – 因为您需要登录Laravel论坛才能看到测试版部分:

If you run composer update and experience problems after doing so,you most
likely need to merge in changes from the application skeleton,which
is the develop branch of laravel/laravel.

If you originally cloned this repository and still share a git history
with it,you can usually merge in changes easily. Assuming your remote
is ‘upstream’ pointed at this repository,you can do the following:

git fetch upstream
git merge upstream/develop

Alternatively you could cherry pick in individual commits from the develop branch,but I won’t cover that here.

If you downloaded the zip distribution originally or removed the
upstream history,you can still resolve your problem manually. Look at
the commits on this branch and make any changes not present in your
application. Usually the breaking changes are simple configuration
changes.

Once Laravel 4 stable has been released the need to do this will be
much less frequent,but these changes can still occur. Keep in mind
that during this beta application breaking changes are very likely to
happen.

感谢Kindari的论坛帖子.

原文链接:https://www.f2er.com/php/138691.html

猜你在找的PHP相关文章