【发布时间】:2020-08-11 22:36:38
【问题描述】:
我创建了一个建筑模型和资源,我通过以下方式完成了。
php artisan make:model Building -m
php artisan nova:resource Building
创建了我的迁移,并且工作正常,但我还需要建筑类型,所以我创建了以下内容。
php artisan make:model BuidlingType -m
php artisan nova:resource BuildingType
但是当我想访问仪表板时出现错误:
Class 'App\BuildingType' not found (View: /Users/Username/projects/enest/vendor/laravel/nova/resources/views/layout.blade.php)```
【问题讨论】:
-
你打错了:
php artisan make:model BuidlingType -m,你写的BuidlingType应该是BuildingType -
哦,我明白了,非常感谢!
标签: laravel eloquent laravel-nova laravel-migrations