GithubHelp home page GithubHelp logo

Comments (14)

shalawani avatar shalawani commented on May 24, 2024 2

Is there any progress on solving the issue guys?

from nova-page.

pietrolerro avatar pietrolerro commented on May 24, 2024 1

@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.

MannikJ avatar MannikJ commented on May 24, 2024

@Nyratas Is there any progress on solving the issue?

from nova-page.

toonvandenbos avatar toonvandenbos commented on May 24, 2024

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.

SaadEddinHassania avatar SaadEddinHassania commented on May 24, 2024

@Nyratas Any Help ?

from nova-page.

pietrolerro avatar pietrolerro commented on May 24, 2024

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.

alexanderfrodeberg avatar alexanderfrodeberg commented on May 24, 2024

@pietrolerro Same here. Or just adding it it StaticResource

from nova-page.

4unkur avatar 4unkur commented on May 24, 2024

@pietrolerro @Riggs1992 How am I supposed to add that line? By editing StaticResource file in vendor folder?

from nova-page.

4unkur avatar 4unkur commented on May 24, 2024

@pietrolerro Thank you for the clarification, but that PR is already closed.

from nova-page.

voidgraphics avatar voidgraphics commented on May 24, 2024

@pietrolerro can you try the change suggested in this comment please? #18 (comment)

from nova-page.

4unkur avatar 4unkur commented on May 24, 2024

@voidgraphics for me just adding public static $model; in StaticResource fixed the issue.

from nova-page.

voidgraphics avatar voidgraphics commented on May 24, 2024

@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.

pietrolerro avatar pietrolerro commented on May 24, 2024

@voidgraphics I'm sorry 🙏, I can't try😣

from nova-page.

pokono avatar pokono commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.