api routes not working laravel

Api routes not working laravel

Have you configured your web server appropriately? If not so which one do you use Nginx or Apache. Getting the same issue here, everything was running fine, adding new routes as i progressed and now all of a sudden the new routes are not being run.

They work fine if index. But the route in itself does not work.. I have tried with Laravel 5 and Lavarel 8. TrK There is the default route and one more route which I added. TrK here it is:. Sorry i checked your code and i couldn't find the routes needed by the laravel to process the endpoint.

Api routes not working laravel

Connect and share knowledge within a single location that is structured and easy to search. I'm using laravel 5. I'll add a test code here. Did you run php artisan serve --port command? Ubuntu Community Ask! Stack Overflow for Teams — Start collaborating and sharing organizational knowledge. Create a free Team Why Teams? Learn more about Teams. Why laravel api. Ask Question. Asked 4 years, 8 months ago. Modified 1 year, 10 months ago. Viewed 18k times. Can please anybody tell me what did I miss or what went wrong? Thank you.

How Stack Overflow is partnering with Google to encourage socially Create a custom middleware to look for an access token Gist and save it to a cookie if there is one. Can anyone help - I really need to get auth working on the api routes.

Can anyone help - I really need to get auth working on the api routes. All of this tells me that this route should not have been included with the web app sample. It will be also helpful if you can share your feedback with our product teams through our feedback site:. The right way to do this is with Passport using the article I linked to before. Part of the problem relates to one of the issues you opened about the Auth0User class not using the Eloquent model. Another is how the Auth0UserProvider is composed.

Connect and share knowledge within a single location that is structured and easy to search. I'm using laravel 5. I'll add a test code here. Did you run php artisan serve --port command? Ubuntu Community Ask! Stack Overflow for Teams — Start collaborating and sharing organizational knowledge. Create a free Team Why Teams? Learn more about Teams.

Api routes not working laravel

Consider upgrading your project to Laravel The most basic Laravel routes accept a URI and a closure, providing a very simple and expressive method of defining routes and behavior without complicated routing configuration files:. All Laravel routes are defined in your route files, which are located in the routes directory. These routes are assigned the web middleware group, which provides features like session state and CSRF protection. You may modify the prefix and other route group options by modifying your RouteServiceProvider class.

Jordi enp por.

Maybe you created a route with the same uri,. Both woogygun and guiden, think it's useful if you paste the relevant code so we can take a look at it. Razvan Theodor Razvan Theodor 61 1 1 silver badge 3 3 bronze badges. TrK here it is:. If you run a:. Our partnership with Google and commitment to socially responsible AI. Happy to help and thank you for the feedback on all this! Are you clear on the specific changes from the last reply, the 4 steps? Can anyone help - I really need to get auth working on the api routes. We appreciate your feedback so far and glad to be fixing the gaps you found in our documentation and samples. I think a better path forward would be to secure the API with Auth0 instead and use access tokens generated during login to authenticate users. I walked through these steps, including the cookie storage, and had it working like a charm. It tried installing fresh project but faced the same issue again,.

Laravel is a PHP framework developed with developer productivity in mind. Written and maintained by Taylor Otwell, the framework is very opinionated and strives to save developer time by favoring convention over configuration.

Mammadali Alizadeh Mammadali Alizadeh 1 1 silver badge 6 6 bronze badges. Happy to help and thank you for the feedback on all this! Highest score default Date modified newest first Date created oldest first. Last updated 7 years ago. This is a real solution. Terms of service Privacy policy Advertise. Not the answer you're looking for? Ask Question. TrK My Bad.. Thank you! I consulted with a few folks internally and wanted to revisit something I mentioned earlier about cookies.

2 thoughts on “Api routes not working laravel

Leave a Reply

Your email address will not be published. Required fields are marked *