1

我正在尝试使用三个表创建一个注册和身份验证系统。用户、帐户和个人资料。

但是,当尝试使用注册表单时,会显示以下消息:表格

找不到列:1054 'where 子句'中的未知列'email'(SQL:select * from userswhere email= thiagothgb@gmail.com 限制 1)

我在这样的模型用户中建立关系。

<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use App\Model\Account;
use App\Model\Profile;

class Users extends Model
{
    protected $table = 'users';
    protected $connection = 'mysql';
    
    public function account(){
        return $this->hasOne('App\Model\Account');
    }
    
    public function profile(){
        return $this->hasOne('App\Model\Profile');
    }
}

当我创建扩展对象时,我可以尝试解决这个问题并扩展模型。

4

0 回答 0