Posts by LRMiloef


    what are the basic things i have to configure that the page will be more present in google? I know that's a very difficult process, but i'd like to know what steps i have to to basicly.


    i think my question fits to this topic, too:

    When i query an Object and it's relations like descriped upper, how can i bring it to vuejs, or to JSON?

    In case one of the relations is a "has-many" relation the returned object contains an array. With php i can handle this.

    But when i want to use that in vue, i only have access to the root-level of the object.

    For example:

    1. $post = Post::where(compact('id'))->related('user')->related('comments')->first();
    2. return [
    3. '$view' => [
    4. 'title' => $id ? __('Edit Post') : __('Add Post'),
    5. 'name' => 'blog/admin/post-edit.php'
    6. ],
    7. '$data' => [
    8. 'post' => $post,
    9. ]
    10. ];

    How i can access post.comments in vuejs? It's not available.. :-(

    i figured it out:



    1. <?php
    2.     $view->script('new_booking', 'mgb:app/bundle/my-component.js', ['vue']);
    3.     $view->data('$data', $data);
    4. ?>
    5. <div id="app">
    6.     <my-component :config="data.config" :products="data.products"></my-component>
    7. </div>

    Yes i did it like you described. But is that then also available for my VUE-Application that's embedded in the view-file of my widget?

    Accessing data in php is no problem, only in vue / js

    Yes, you're right... at the moment i have both:

    An controller-method for testing and and newly an widget.

    When i try to render the view through the controller method, all is fine.

    When i try to render the vie through the widgtet, my vue application will crash because all data is missing...

    Do you know what i mean?

    So now i'm trying to load my view in an widget-position.

    That works so far, but i have some trouble with passing data to the $data-Object of vue...…ng#render-a-view-manually

    In this docs are two methods descriped how to render a view. In case of an widget i have to use the manually method.

    That will not work.

    When i do this in my controller, it works fine:

    How can i make $data available, when i render the view manually?

    ok, i solved my problem by saving all entities after each other. There is no mechanism for saving all related data, build in pagekit. I have to memory all new id's and i will delete all stuff in case of an error during the saving process. So i have no fragmented data in my database.

    here you can see my API Method for saving... I really don't know how to optimize that...

    i need to store the price additionally to prevent changing previous orders in case of price-changes.

    Yes, that's exactly what i mean :-)

    I also thought so, but i tried it and the value was still not saved...

    then i also have something like that:

    Now i want to save the complete order...