【发布时间】:2014-08-07 03:11:25
【问题描述】:
您好,我在 Google 上搜索过,但没有找到任何相关信息,而且我之前在 Laravel 中从未遇到过此错误。
我没有修改我的用户模型,只是添加了hasOne 关系。
我不断收到这个错误,我现在 2 小时都无法解决
Trait 'Illuminate\Auth\UserTrait' not found
我没有碰过模型
用户模型
<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = array('password', 'remember_token');
public function metadata()
{
return $this->hasOne('Metadata');
}
}
有人可以帮帮我吗?
【问题讨论】: