outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
273 stars 97 forks source link

Laravel octane problem #87

Closed bsormagec closed 2 years ago

bsormagec commented 2 years ago

When trying to use with octane, Settings appears 3 times everywhere. I am attaching pictures below. Do you have any idea about the situation @simonhamp ? Thank you.

screenshot 6(18) screenshot 6(14)
Tarpsvo commented 2 years ago

Ah crap, it might be that the static data is leaking between instances and it's being filled multiple times. I might have to make the data non-static and tie it to the app as a singleton class.

bsormagec commented 2 years ago

Ah crap, it might be that the static data is leaking between instances and it's being filled multiple times. I might have to make the data non-static and tie it to the app as a singleton class.

I can't find the solution and just wanna mention you here thank you for your answer. When you did these changes. I can decrease my vapor invoice :) Thank you. @Tarpsvo

Tarpsvo commented 2 years ago

Hi @bsormagec!

I refactored the backend code to store the $fields and $casts etc in a singleton tied to the $app instance. This should fix the data leaking between instances.

Can you test out version 3.4.0? Thanks!

Good luck!

bsormagec commented 2 years ago

Thank you @Tarpsvo i am testing and giving feedback ASAP!

bsormagec commented 2 years ago

Hello @Tarpsvo. It worked! Thank you so much! We can close the issue now, great work!

Tarpsvo commented 2 years ago

Awesome, glad to hear that. :)