Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Product categories

    General Discussion
    2
    2
    225
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lukas last edited by

      Hi, I read some topics about getting product category, for example, in product page. I know that you can’t directly take product category like this $product->category. Maybe someone has a solution how to do that with your own code? What I see in the database, everything looks clear. Products and categories have their own tables and there’s a separate table with category id and product id. Also, there’s a relationship described in one of php files of bagisto. Anyone have an idea how to add this functionality? I tried to do it in basic laravel structure with product and category relationship, but still no luck.

      Thank you.

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Yes both are separated so that on deletion only linking should break rather then deleting anything,

        1 Reply Last reply Reply Quote 0
        • First post
          Last post