当用户尝试使用他们的Facebook帐户登录时出现此错误:
(1/1)FatalErrorException 未找到“Illuminate \ Foundation \ Auth \ Fbuser”类
这是我的代码:
namespace App;
use App\Fbuser;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\Fbuser as Authenticatable;
class Fbuser extends Authenticatable
{
protected $fillable = [
'first_name','last_name', 'email', 'work',
];
protected $hidden = [
'remember_token',
];
}
答案 0 :(得分:0)
你应该试试这个:
只需从模型中删除使用App \ Fbuser; 并尝试
AND
更新您的模型,如:
namespace App;
use Illuminate\Database\Eloquent\Model;
class Fbuser extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'your_table_name';
/**
* The database primary key value.
*
* @var string
*/
protected $guarded = ['id'];
protected $fillable = [
'first_name','last_name', 'email', 'work',
];
}
希望这对你有用!!!!
答案 1 :(得分:0)
这可能是由于几个原因造成的。
composer dump-autoload
。php artisan cache:clear
答案 2 :(得分:0)
运行此代码并检查
ALTER SCHEMA 'newSchema' TRANSFER 'oldSchema'.'table'