<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Routing on seth-shi</title><link>https://sethix.com/tags/routing/</link><description>Recent content in Routing on seth-shi</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 01 Mar 2018 22:06:16 +0800</lastBuildDate><atom:link href="https://sethix.com/tags/routing/index.xml" rel="self" type="application/rss+xml"/><item><title>Insights on Developing RESTful APIs with Laravel</title><link>https://sethix.com/posts/2018030122/</link><pubDate>Thu, 01 Mar 2018 22:06:16 +0800</pubDate><guid>https://sethix.com/posts/2018030122/</guid><description>Here are some insights I’ve gained while working with Laravel to develop RESTful APIs.
Getting Started API Authentication: For public APIs, consider OAuth2.0; for private/internal APIs, token-based authentication (e.g., JWT) is often sufficient. Versioning: Include an API version in routes for future scalability: Route::prefix(&amp;#39;v1&amp;#39;)-&amp;gt;group(function () { // Routes here }); CORS Handling: Use the barryvdh/laravel-cors package for seamless cross-origin requests. Sample API Endpoint
Example Code Authentication Use jwt-auth for JWT-based authentication.</description></item></channel></rss>