gpt4 book ai didi

php - Bcrypt 在 Lumen 5.4 : Call to undefined function bcrypt() 中不工作

转载 作者:IT王子 更新时间:2023-10-28 23:57:38 32 4
gpt4 key购买 nike

我创建了一个新的 Lumen 5.4 项目并尝试播种一些数据。在播种机中,我使用 bcrypt 来散列密码。但是当我运行 php artisan db:seed 时,我得到了这个错误:

Call to undefined function bcrypt()

为什么我不能在 Lumen 中使用 bcrypt?我以前在 Laravel 中使用过它。

最佳答案

你可以试试:

app('hash')->make('yourpassword');

关于php - Bcrypt 在 Lumen 5.4 : Call to undefined function bcrypt() 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42664043/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com