Trait 'Illuminate\Auth\UserTrait' not found

Trait ‘Illuminate\Auth\UserTrait’ not found

laravel小白,laravel5.7

<?php

namespace App;

use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
use Illuminate\Database\Eloquent\Model;
class Badmin extends Model implements UserInterface, RemindableInterface {

    use UserTrait, RemindableTrait;

    protected $table = 'badmin';

    protected $hidden = array('password');

    public static $rules = [
        'nickname' => 'required|alpha_num|min:2',
        'username' => 'required',
        'email'=>'required|email|unique:badmin',
        'password'=>'required|alpha_num|between:6,12|confirmed',
    ];
}

一直提示找不见这个类,用了 php artisan make:auth
还是不起作用

本作品采用《CC 协议》,转载必须注明作者和本文链接
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 1
66

检查文件是否存在 检查文件命名空间 检查composer 最好autodump下 检查UserTrait 这个类的修饰符

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!