
[英]Laravel Nova installation - There are no commands defined in the “nova” namespace
[英]Laravel Nova BelongsTo Field Appending Namespace To Current Namespace
我目前正在将laravel 5.8与laravel nova一起使用。
当我在新星动作文件中使用模型类时,如下所示:
Namespace App\Nova\Actions;
use App\Nova\User;
use Orlyapps\NovaBelongsToDepend\NovaBelongsToDepend;
class PlayerDD extends Action
{
public $name = 'Spelers toekennen';
/**
* Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @return mixed
*/
public function handle()
{
}
/**
* Get the fields available on the action.
*
* @return array
*/
public function fields()
{
return [
BelongsTo::make(User::class)
];
}
}
Laravel返回错误:找不到类'App \\ Nova \\ Actions \\ App \\ Nova \\ User'。
当我为用户模型使用根名称空间时,该名称空间被追加到当前名称空间。
有针对性的解决方法,我应该在哪里寻找冲突?
提前致谢!
顺便说一句,我尝试了这个\\ App \\ Nova \\ User
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.