Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel Auth::尝试成功,但现在失败_Php_Laravel_Login Attempts - Fatal编程技术网

Php Laravel Auth::尝试成功,但现在失败

Php Laravel Auth::尝试成功,但现在失败,php,laravel,login-attempts,Php,Laravel,Login Attempts,今天我想向我的朋友展示我的网站。我做了git pull,artisan migrate,seed,键生成,并正确生成了.env文件。但是当我们想登录时,它不起作用 登录名对我有效。注销/登录。没关系,成功了!!我将项目复制到新文件夹,并从Git repo重新安装(可能是一些未添加的文件)。它不起作用了。好吧,我很高兴,因为我想我忘了给Git添加一个文件。我将原始文件复制回原始路径并尝试登录。不工作。有人知道这个吗 控制器 模型 我解决了我的问题。我的密码列名为login\u passwd,但是a

今天我想向我的朋友展示我的网站。我做了
git pull
artisan migrate
seed
键生成
,并正确生成了
.env
文件。但是当我们想登录时,它不起作用

登录名对我有效。注销/登录。没关系,成功了!!我将项目复制到新文件夹,并从Git repo重新安装(可能是一些未添加的文件)。它不起作用了。好吧,我很高兴,因为我想我忘了给Git添加一个文件。我将原始文件复制回原始路径并尝试登录。不工作。有人知道这个吗

控制器 模型
我解决了我的问题。我的密码列名为
login\u passwd
,但是
auth::guard->trunt
在名为
password
的列上进行验证,因此我将我的列重命名为
password
,并且它正在工作

我解决了我的问题。我的密码列名为
login\u passwd
,但是
auth::guard->trunt
在名为
password
的列上进行验证,因此我将我的列重命名为
password
,并且它正在工作

你在使用ubuntu还是linux?什么时候尝试新环境?没有。。我在windows中工作,但现在正在工作!谢谢:)你在用ubuntu还是linux?什么时候尝试新环境?没有。。我在windows中工作,但现在正在工作!谢谢:)别忘了!别忘了!
if(Auth::guard('admin')->attempt([
    'email_address' => $request->get('email_address'),
    'login_passwd' => $request->get('login_passwd'),
    'status_active' => true,
    'status_admin' => 1,])) {
         return redirect( route('backend::dashboard.core') );
}
namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;

class UsersCore extends Authenticatable
{
    use HasRoles;

    protected $table = 'users_core';

    protected $primaryKey = 'id';

    public $incrementing = true;

    public $timestamps = true;

    public function usersData()
    {
        return $this->hasOne('App\Models\UsersData', 'user_id', 'id');
    }

    public function getAuthPassword()
    {
        return $this->attributes['login_passwd'];
    }
}