【问题标题】:I have a problem with laravel nova and showCreateRelationButton function我对 laravel nova 和 showCreateRelationButton 函数有疑问
【发布时间】:2020-05-16 10:06:05
【问题描述】:

我在 laravel nova 3.6 版本中,我有一个包含多个 belongsTo 字段的表单。在 3.X 版本中,提供了一个有趣的功能,“内联关系”允许使用“showCreateRelationButton”创建相关资源,但我有这个代码:

BelongsTo::make('Candidato')

            ->searchable()
            ->sortable()
            ->onlyOnForms()
            ->prepopulate()
            ->showCreateRelationButton(function (NovaRequest $request) {
                return true;
            }),

并且没有出现创建资源链接

Belongsto Field create resource

我需要帮助:(

【问题讨论】:

标签: php laravel laravel-nova


【解决方案1】:

composer alexbowers/nova-prepopulate-searchable 导致了一个已知问题。安装后,showCreateRelationButton() 不起作用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-07
    • 1970-01-01
    相关资源
    最近更新 更多