Comments (14)
Is there any progress on solving the issue guys?
from nova-page.
@4unkur look at the PR I mentioned. We'd wait for the package owner to fix/merge that. Meanwhile, yes, I did edit the files in vendor directory.
from nova-page.
@Nyratas Is there any progress on solving the issue?
from nova-page.
Hi @MannikJ,
I'm quite busy these days and hope to have a few hours for the open issues next week. In the meantime, if this issue needs to be solved quickly for your projects, feel free to suggest a PR :)
from nova-page.
@Nyratas Any Help ?
from nova-page.
This seems to be connected to this.
I added
public static $model = '';
either in PageResource and OptionResource and everything started to work.
from nova-page.
@pietrolerro Same here. Or just adding it it StaticResource
from nova-page.
@pietrolerro @Riggs1992 How am I supposed to add that line? By editing StaticResource
file in vendor
folder?
from nova-page.
@pietrolerro Thank you for the clarification, but that PR is already closed.
from nova-page.
@pietrolerro can you try the change suggested in this comment please? #18 (comment)
from nova-page.
@voidgraphics for me just adding public static $model;
in StaticResource
fixed the issue.
from nova-page.
@Nyratas from my understanding we weren't very keen on this approach since it's a bit of a hack. Our Page resources have nothing to do with models. But to allow compatibility with a lot of other packages, and fix various bugs such as this one, it would actually be beneficial, even if it's a temporary solution until we can find a better way to handle it. What do you think?
from nova-page.
@voidgraphics I'm sorry 🙏, I can't try😣
from nova-page.
Thank you! I ended up overriding the config with my own PageResource.
<?php
namespace App\Nova\NovaPage;
use Laravel\Nova\Fields\DateTime;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Panel;
/**
* https://github.com/whitecube/nova-page/pull/61
* https://github.com/whitecube/nova-page/issues/33
*
* Class PageResource
* @package App\Nova\NovaPage
*/
class PageResource extends \Whitecube\NovaPage\Pages\PageResource
{
/**
* The model the resource corresponds to.
*
* @var string
*/
public static $model;
}
Then in config/novapage.php
change this line with your own PageResource:
'default_page_resource' => \App\Nova\NovaPage\PageResource::class,
Hope that helps someone else in the meantime that it gets merged.
from nova-page.
Related Issues (20)
- Class "Route" not found
- Class "App" Not Found
- Method App\\Nova\\Templates\\Formations::forceFill does not exist HOT 4
- Title will not save in templates HOT 5
- Using with Ebess\AdvancedNovaMediaLibrary
- use the laravel new lang folder path instead of the old one
- Compatibility with Laravel 11
- Page Resource Search does not work
- FR: Hide options from sidebar HOT 2
- Ability to hide nova-option HOT 1
- Detail view broken HOT 7
- Cast Date Field HOT 3
- PHP 8 Compatibility? -- Required parameter follows optional parameter HOT 2
- Remove template declaration in routes HOT 3
- Arabic encoding
- Nova 4 Support HOT 6
- TypeError: Cannot read properties of undefined (reading 'resource') HOT 3
- Error deleting a file HOT 1
- Call to undefined method Whitecube\NovaPage\Pages\Query::exists() HOT 3
- Can this be used for multiple page layouts? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-page.