SQLite数据库的Laravel Tinker错误

问题描述

从一个新项目开始:

laravel new new-project
cd new-project
touch storage/database/database.sqlite

然后在.env

DB_CONNECTION=sqlite
DB_DATABASE=storage/database/database.sqlite
DB_FOREIGN_KEYS=true

迁移成功...

php artisan migrate
php artisan tinker
>>>App\User::all()

但是当我尝试获取所有用户时,它返回以下错误:

PHP Fatal error:  Class 'App/User' not found in Psy Shell code on line 1

我可能会缺少什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)