gpt4 book ai didi

laravel - 在 Laravel Nova 中按条件隐藏按钮 "Create & Add Another"

转载 作者:行者123 更新时间:2023-12-04 13:42:10 26 4
gpt4 key购买 nike

如果我通过相关资源的引用创建新资源
new?viaResource=some-resource&viaResourceId=8&viaRelationship=another-sesource
我想隐藏“创建并添加另一个”按钮。

/image/M3Hy6.png

最佳答案

https://github.com/laravel/nova-issues/issues/1620#issuecomment-516384334

this can be easily done using custom CSS:

  1. Create public/css/custom.css with next lines:

    button[dusk='update-and-continue-editing-button'], button[dusk='create-and-add-another-button'] {
    display: none;
    }
  2. Install custom.css in NovaServiceProvider.php:

    public function boot()
    {
    parent::boot();
    Nova::style('custom-fields-css', public_path('css/custom.css'));
    }

关于laravel - 在 Laravel Nova 中按条件隐藏按钮 "Create & Add Another",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55512998/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com