当MongoDB设置为默认值时,强制Laravel使用MySQL进行身份验证

当MongoDB设置为默认值时,强制Laravel使用MySQL进行身份验证,laravel,laravel-5,Laravel,Laravel 5,我认为在User.php中添加以下行就足够了。我还需要在哪里修改数据库连接 protected $connection = 'mysql'; 然而,当试图重置我的密码时,它抛出了一个错误。我看到它正试图与我的MongoDB进行通信,这是我的默认DB strtotime() expects parameter 1 to be string, array given in /var/www/html/ocd3/vendor/laravel/framework/src/Illuminate/Auth

我认为在
User.php
中添加以下行就足够了。我还需要在哪里修改数据库连接

protected $connection = 'mysql';
然而,当试图重置我的密码时,它抛出了一个错误。我看到它正试图与我的MongoDB进行通信,这是我的默认DB

strtotime() expects parameter 1 to be string, array given
in /var/www/html/ocd3/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php line 126 at HandleExceptions->handleError('2', 
'strtotime() expects parameter 1 to be string, array given',
'/var/www/html/ocd3/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php', '126', array('token' => array('_id' => object(MongoId), '

有人在这里面临同样的问题:

基本上:password_resets表不同于users表,所以我想您必须在config/auth.php文件中设置所需的连接:

'passwords' => [
    'users' => [
        'provider' => 'users',
        'email' => 'auth.emails.password',
        'table' => 'CUSTOM_CONNECTION.password_resets',
        'expire' => 60,
    ],
],