Laravel类型错误:参数1传递给lluminate\Auth\Passwords\PasswordBroker



我有两种类型的用户,普通用户和管理员用户。

所以我需要创建其他控制器、代理等来使功能正常工作。

当我单击"发送密码重置链接"时,出现此错误:

Type error: Argument 1 passed to 
IlluminateAuthPasswordsPasswordBrokerManager::createTokenRepository() 
must be of the type array, string given, called in 
/home/vagrant/Code/Manifiesto2017/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php on line 71

如何解决?

我遇到了同样的问题。

当您未设置应用密钥时,可能会发生这种情况。

可以通过运行php artisan key:generate来设置应用密钥

或者,您可以对其进行硬编码config/app.php设置适合使用的应用程序密钥。

删除缓存/bootstrap/cache

那你就可以走了。

我希望这有帮助

最新更新