-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Found out that assigning a simple belongsTo relationship is running its own fields method. In this case I want to assign a catalogue to an account.
e.g. App\Nova\Account.php@fields
BelongsTo::make('Primary Catalogue', 'primaryCatalogue', 'App\Nova\Catalogue')
->hideFromIndex()
->rules('nullable')
->searchable(),
but my App\Nova\Catalogue@fields has this Tab
Tab::make('Pages', [
CataloguePages::make()
->themePages((new PageServices)->getThemePages(App('entity')->theme))
->model($this->load('pages.page')->toArray())
]),
which loads up a lot of pages, this is acceptable if I'm in the catalogue show page but when I'm just assigning a catalogue to an account, I don't think this is necessary and it's just loading up pages for all those catalogues. Is there a way to disable or at least selectively ignore fields in this scenario?
I temporarily used searchable just to avoid loading up catalogues all at once.
Metadata
Metadata
Assignees
Labels
No labels