I cannot find where to remove one of the buttons on the edit Resource page.
The button I want to remove is the one labeled:
Update & Continue Editing
Laravel Nova Resource
class VehicleService extends Resource
{
public static $model = \App\Models\VehicleService::class;
public function fields(Request $request)
{
return [
];
}
public function fieldsForIndex(NovaRequest $request)
{
return [
BelongsTo::make('Vehicle', 'vehicle', 'App\Nova\Vehicle')
->rules('required')
->viewable(false),
];
}
public function fieldsForDetail(NovaRequest $request)
{
BelongsTo::make('Vehicle', 'vehicle', 'App\Nova\Vehicle')
->viewable(false),
}
}
There are no conditionals in the Nova source to show / hide that button.
But there are dusk attributes for test purposes that you can hook onto.
Adding a custom nova theme will include a css file you can add this too:
[dusk="update-and-continue-editing-button"] {
display: none
}