• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

Where does by default API hits?

General Discussion
4
6
541
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.
  • H
    hedyd last edited by 14 Jan 2022, 05:44

    I am wondering where the API hit first.
    I mean to say I have created a package for API only.

    But when I hit the URL, mentioned in the API package, it didn't hit there, instead of that it hit inside the Admin folder.

    So I want to know how the process works for API only.

    I want to handle all my APIs in one place. So is there any workaround for that?

    Nam in quod velit ni

    1 Reply Last reply Reply Quote 0
    • devansh-webkul
      devansh-webkul last edited by 14 Jan 2022, 14:33

      API url are hit via api/ prefix.

      1 Reply Last reply Reply Quote -1
      • H
        hedyd last edited by 15 Jan 2022, 07:06

        I think you didn't get my question. What I'm trying to say is, in a simple laravel project it went to api.php folder. But where did it land on your case? I was trying to create a new API for some modules. And I found out that it is redirecting to the Admin folder route.

        I am aware of api/ prefix and it is working fine. But I've to create it under admin.php. So this is what I am asking is this where all my APIs gonna hit?

        Nam in quod velit ni

        1 Reply Last reply Reply Quote 0
        • devansh-webkul
          devansh-webkul last edited by 17 Jan 2022, 06:09

          You can't create an admin package because they are packages that are maintained by us. If you are doing so, then updates will get interrupted due to conflicts and then you need to compatible this at your end.

          You need to use your api.php file provided by Laravel with the same route prefixes even you can override also.

          hamza7262 1 Reply Last reply 5 Oct 2022, 11:29 Reply Quote 0
          • 9 months later
          • hamza7262
            hamza7262 @devansh-webkul last edited by 5 Oct 2022, 11:29

            @devansh-webkul i am using latest, version of API, and i want to make changes in API how i can do that. its located in vendor folder and i cant make changes there. what is the process of updating code for APIs ?

            1 Reply Last reply Reply Quote 0
            • sanjay-webkul
              sanjay-webkul last edited by admin 7 Oct 2022, 09:18 7 Oct 2022, 08:03

              Hi there,
              You can create your custom package and override the Routes on your package.

              OR

              You can use the Bagisto API's as a package. for this first, you need to remove API from composer.json file and then update the composer.

              1 Reply Last reply Reply Quote 0
              3 out of 6
              • First post
                3/6
                Last post