Bagisto Forum

    Bagisto

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

    haven't found product search api...

    General Discussion
    3
    3
    323
    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.
    • N
      nahiyan.aziz last edited by

      i was searching api which returns me matched result of my search key which is available in web but not in api.. what i found is

      http(s)://example.com/public/api/products?name=’Leather Shoes’

      but this has not worked for me. it hasn't return me the specific product rather it returns me all products....

      whats wrong.?

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

        Please specify the bagsito version.

        Thanks

        1 Reply Last reply Reply Quote 0
        • A
          aliraza last edited by

          In api , it is retreiving data on the behalf of term. Try send term instead of name or try this in index method of ProductController.

          //name into term
          $request = request()->all();
          if(isset($request['name'])){
          $request['term'] = $request['name'];
          }
          // category_id into category
          if(isset($request['category_id'])){
          $request['category'] = $request['category_id'];
          }

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