我在Model函数中使用以下代码段。为什么它不承认Auth?这就是我的模型的样子。我正在关注本教程http://code.tutsplus.com/tutorials/build-web-apps-from-scratch-with-laravel-the-eloquent-orm--net-25631
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
类用户扩展了Eloquent {
public static $timestamps = true;
protected $table = 'users';
public function user_profile()
{
return $this->has_one('User_Profile');
}
public function photos()
{
return $this->has_many('Photo');
}
public function viewed()
{
return $this->has_many_and_belongs_to('User', 'interactions', 'viewer_id', 'viewee_id');
}
public function videos()
{
return $this->has_many('Video');
}
}