7

I have a Nova resource named "Partner" with relationship to another Nove resource named "Rate".

BelongsTo::make('Rate*', 'customrate', 'App\Nova\Rate')->onlyOnForms()

Now when user try to create a parter, the select field to choose rate is mandatory.

Client doesn`t want to keep it mandatory to choose a rate for partner. Any solution for this problem?

Vineeth Vijayan
  • 1,215
  • 1
  • 21
  • 33

1 Answers1

20

Use nullable() which is added in version 1.1.7

BelongsTo::make('Rate*', 'customrate', 'App\Nova\Rate')
    ->onlyOnForms()
    ->nullable()
Saumini Navaratnam
  • 8,439
  • 3
  • 42
  • 70