whitecube / nova-page

Static pages content management for Laravel Nova
https://whitecube.github.io/nova-page
MIT License
238 stars 41 forks source link

Tabs in Pages #24

Closed Krato closed 3 years ago

Krato commented 5 years ago

Hello, I'm trying to use Nova Tabs for a template.

But when I add the trait for see tabs on edit views (TabsOnEdit trait), throws an error:

Cannot make non static method Whitecube\NovaPage\Pages\Template::fill() static 
in class Eminiarts\Tabs\TabsOnEdit
Captura de pantalla 2019-03-09 a las 20 58 55

Thank you.

voidgraphics commented 5 years ago

This is because the fill method in Nova Resources is declared as static, which Nova Tabs then overrides with its TabsOnEdit trait.

Our implementation of the fill method is not static, so it breaks.

What's your take on this @Nyratas? Could we possibly make our fill method static?

Krato commented 5 years ago

Thats will be great. Thanks to think about.

toonvandenbos commented 5 years ago

We will take a look why our fill method is not static and does not break any of the Templates behavior. But even if we make it static, keep in mind that this doesn't guarantee a full compatibility with Nova Tabs since Templates are not Models.

Krato commented 5 years ago

Yes I know. Hope that works fine :)