Recent Topics

Where does by default API hits?



  • 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?



  • API url are hit via api/ prefix.



  • 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?



  • 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.


Log in to reply