4

if I create a new resource by reference from the related resource

new?viaResource=some-resource&viaResourceId=8&viaRelationship=another-sesource

I want to hide the button "Create & Add Another".

https://i.stack.imgur.com/M3Hy6.png

4n70wa
  • 337
  • 4
  • 19

1 Answers1

2

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'));
        }
    
RobC
  • 22,977
  • 20
  • 73
  • 80
4n70wa
  • 337
  • 4
  • 19