msurguy / laravel-shop-menu

Menu ordering/management application demo, like Wordpress menu manager
http://laravel-menu-builder.gopagoda.com/admin/menu
334 stars 100 forks source link

Some remarks #2

Closed barryvdh closed 10 years ago

barryvdh commented 10 years ago

Hey, Thanks for the example code. I did it somewhat similar, but instead of dropping, just use a save button and serialize/save the entire form at once, and created a Twig macro for menu builder :)

I just have a few remarks/questions:

msurguy commented 10 years ago

To address your questions: 1) yes, the input doesn't need to be escaped, I just use that based on some bad experience I had with anything user-driven and user-submittable. 2) You're right, I forgot to mention about the particalar fork of Nestable, I had to search through lots of pull requests on that project to get the desired result. I now created a fork with the proper modifications: https://github.com/msurguy/Nestable 3) Definitely could be done, I just want to make my tutorials so simple and adaptable to other things that developers could see the process before packaging everything in a tiny little box that they could only see from the outside. I like to leave things in-progress for them to learn from it. This by no means is the final version that they should have in their product. 4) Actually I disagree with naming actions/routes. I haven't used it at all since I started with Laravel abt 2 years ago. In my opinion it doesn't help much to use named routes. (this is something that we just have to disagree on)

mackhankins commented 10 years ago

https://github.com/tchapi/Nestable I'd love to have the noChildrenClass from this fork with yours, but I can't seem to get it together.

mackhankins commented 10 years ago

Did it in the controller, never mind. Allows no children to be assigned for that category which is exactly what I was looking for.

    public function postIndex()
    {
        $source = e(Input::get('source'));
        $destination = e(Input::get('destination', 0));

        if($destination == 1) return false;
msurguy commented 10 years ago

@mack-hankins Very cool!