-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant use helper functions in Nova #72
Comments
I was unable to reproduce the issue with my nova. Could you provide more information/reproducible code example so we can take another look at this issue. |
In one of my Templates, I had a static function |
I tried to reproduce the issue with code above but was unable to. Closing this at the moment since i can't find a reason how this could be regions/page-manager issue. |
It didn't matter if I actually implemented the retrieved values into the Color Field (or any other field). The mere presence of the I was actually caching the response of Heres a rough example class AppController extends Controller
{
public static function regions()
{
return Cache::remember('regions', 60, function(){
return nova_get_regions();
});
} My Template class Shortlist extends Template
{
public static $type = 'region';
public static $name = 'Shortlist';
public function fields(Request $request): array
{
$regions = AppController::regions();
return [ ... Even if I do nothing with |
My bad, this seems to be the problem indeed when calling nova_get_regions inside region template. |
No worries. Right now Im getting around it by just using the |
Im trying to use the
nova_get_regions()
helper function within Nova itself, so I can pull in some region data and display it in a FieldFor some reason this causes some kind of infinite loop, hang or crash? The page just times out. Is there a way I can access region or page data within Nova without this happening?
The text was updated successfully, but these errors were encountered: