Quick and Easy Nested Categories in Laravel

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • Want more? Explore the library at codecourse.com
    Official site
    www.codecourse...
    Twitter
    / teamcodecourse
    To solve a potentially unlimited amount of nested items like categories, you need more than recursive Eloquent relationships. Let's figure out how to easily build a tree of items with a single query, and use recursive Blade components to output the result.

Комментарии • 35

  • @alexlytle089
    @alexlytle089 2 года назад +4

    This is Laravel gold. Just bought a year subscription as a thank you. I'm sure he will come out with more resources. Almost every app I build has categories and sub categories and child. I had to make custom tables and restrict how nested they could get. This is a complete game changer. Literally will save my hours of work because i can reuse this same logic

  • @AmrSubZero
    @AmrSubZero 2 года назад +1

    been struggling with this scenario for years, especially with ecommerce projects, never thought it would be that easy. thanks for sharing!

  • @BlackhatGamer
    @BlackhatGamer 2 года назад +1

    u deserve more view sir!, what a great explanation. i was looking for the best solutions and practice to handle this case. thank you so much

  • @itcforyou
    @itcforyou 2 года назад +1

    Great video but the bad thing on this tutorial that you used a package we will not learn how to do what the package is doing.

  • @amirkaftari5188
    @amirkaftari5188 11 месяцев назад

    super mentor and fantastic tutorial...well done man

  • @WintersTale-vz1fm
    @WintersTale-vz1fm Год назад +1

    getting error: Method Illuminate\Database\Eloquent\Collection::toTree does not exist. when im using tree()->get()->ofTree();

  • @mogr488
    @mogr488 9 месяцев назад

    Thank you.

  • @sirikorn.s
    @sirikorn.s Год назад

    Can we delete parent and child at same time ?

  • @3mro_coding
    @3mro_coding 2 года назад

    Alex you saved me bro.

  • @raccoon_dad
    @raccoon_dad 3 месяца назад

    8:29 stepChild ?

  • @muhammadhamzaawan4504
    @muhammadhamzaawan4504 2 года назад

    Really helpful

  • @robyortega6147
    @robyortega6147 2 года назад

    can completed make crud using this library

  • @dbones-aow3
    @dbones-aow3 2 года назад

    Thanks man

  • @ahmadrio
    @ahmadrio 2 года назад

    terimakasih

  • @mogr488
    @mogr488 9 месяцев назад +1

    I never thought of recursive components ! thank you

  • @stefankrejci4306
    @stefankrejci4306 2 года назад +1

    Great video - and great package! I vivedly remember writing recursive cte's ten years ago...

  • @rezwansaki
    @rezwansaki 9 месяцев назад

    Great!!! Thanks!

  • @techatival
    @techatival 2 месяца назад

    Thanks for the tutorial.

  • @kemal6039
    @kemal6039 2 года назад

    We're gonna have to come up with a name for this child... Let's call it subchild.
    I wasn't expect to laugh this hard to a laravel video 😂😂😂

  • @Programming-Fun-With-Hima
    @Programming-Fun-With-Hima 2 года назад

    I really love your accent, your voice 😍 ❤ 💕
    I hope you make a vue series 💖

  • @rosselliot8971
    @rosselliot8971 2 года назад

    Lets say I have posts that have comments. So I have a posts table and comments table. The comments table contains all comments for all posts and is the table the adjacency relationships work on. But how can I create a link between the post ID and the comments for that post?
    I assumed I could just make the parent_id field the id of the post *when the comment had no parent*. That is, the post ID would operate as the root of the comment tree since the post is indeed the root for it sown comments.
    How have other solved this?

  • @kmaphane
    @kmaphane 2 года назад

    Thanks for the video. Definitely subscribing to this channel and more. Whoever is made this video, deserves a bells. Top-notch!

  • @alissonwell7938
    @alissonwell7938 2 года назад

    Isn't this recursive query too expensive?

  • @kuthub1989
    @kuthub1989 2 года назад

    can I expect more laravel stuffs from you in future.

  • @alperenkacmaz3063
    @alperenkacmaz3063 2 года назад

    Thanks Boss

  • @dibbyo456
    @dibbyo456 2 года назад

    This is GOLD.

  • @augischadiegils.5109
    @augischadiegils.5109 2 года назад

    ❤️

  • @TeqrayT
    @TeqrayT 2 года назад

    Super video, thanks!

    • @TeqrayT
      @TeqrayT 2 года назад

      How can a simple drag & drop nested categories arrangement be made using this package with new frontend technologies such as vuejs, livewire? If you can help with this, I hope it will be very useful. I've done a lot of web browsing but I haven't found a complete solution, what I found is old methods.
      Thank you from now.

  • @stojankukrika7242
    @stojankukrika7242 2 года назад

    I get error:
    ErrorException
    Undefined variable: category (View: /menu_three/resources/views/components/category-item.blade.php)
    @props(['category'])
    {{$category->name}} ({{$category->id}}) - it's shows me error on this line :(