-
Notifications
You must be signed in to change notification settings - Fork 35
Description
- Laravel Version: 5.7.9
- Nova Version: 1.1.4
- PHP Version: 7.2.3
Description:
I sent a support email over a week ago but had no reply so checking if anyone can help here or knows a workaround.
There is a couple of bugs that i have come across which would be great to get sorted. These are inconsistencies i can live with as a developer but nova is going to be extremely useful for internal staff to manage the data for a bespoke customer front-facing build. These inconsistencies will be confusing to these non developers.
-
NULL relationships are possible and they do work if you just hit save without selecting an item from a relationship dropdown. However if a selection is made there is no way to revert back to a "None" option. Could this be a configuration option? something like
->nullable('None Label')on the field type? -
Changing relationship labels only reflects on index and details screens. .eg a User relationship might exist but in business logic it is something completely different.. "Booked By", "Added By", "Sales Person" etc. Which would represent a user. Here I have a Organisation which can have a Parent Organisation (nullable too, which relates back to point 1).
- Setting a date format only reflects on index and details screen. This is confusing, especially those from countries that don't use the Y-M-D format. While building the form elements i genuinely thought the
->format()method was doing nothing till I noticed it only applies on the index/details screens.
Steps To Reproduce:
Add a relationship field to a Resource (in this case BelongsTo) with a different name by setting the additional attributes in this case the underlying resource is Organisation
BelongsTo::make('Parent Organisation', 'parent', self::class),Organisation model parent relationship:
public function parent()
{
return $this->belongsTo(Organisation::class, 'parent_id');
}See that name only reflects on index/details and the dropdown field itself, also see no option to revert back to a nullable state.
Add a date field with a custom moment.js format
Date::make('Date')->format('DD/MMM/YYYY')->sortable(),See that format only reflects on index/details

