In Nova 1.2.0 / Laravel 5.7.14
I have a BelongsToMany that is breaking the php memory when it is being pulled.
I have a resource that I can see the count of (over 30000) from a BelongsToMany - when I click to the detail of the resource - it tells me that it hit a memory cap.
According to the doc i can only find:
https://nova.laravel.com/docs/1.0/resources/relationships.html#morphtomany
Searchable relation
HOWEVER - this solution is only for Create/Update - I need one for the Detail.
When it finish rendering - I will get pagination but the page won't load at all. Any idea for solution?
I tried using telescope but to no avail to solve this.
As an example I have a Thread class on index I can see how many users and on Detail I hook myself with a belongstomany
Number::make('Users', function () {
return $this->userCount();
})
->hideWhenCreating()
->hideWhenUpdating(),
BelongsToMany::make('Users', 'users', Users::class)->fields(function () {
return [
Text::make('weight', 'value'),
];
}),
It just break the detail page