<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Laravel API help]]></title><description><![CDATA[<p dir="auto"><strong>I have a set of currently working routes on Laravel. I want to make RESTFUL API for scaling for android front end.  How do I convert my existing web.php into api.php?<br />
As a example what are the routes should be be there in api.php for laravel default AUTH.<br />
I just want to call my existing routes by POSTMAN</strong></p>
]]></description><link>https://lankadevelopers.lk/topic/94/laravel-api-help</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 16:56:05 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/94.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 13 Jan 2019 08:43:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Laravel API help on Sun, 13 Jan 2019 13:51:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1">@ciaompe</a> my pleasure bro...</p>
]]></description><link>https://lankadevelopers.lk/post/643</link><guid isPermaLink="true">https://lankadevelopers.lk/post/643</guid><dc:creator><![CDATA[dev_lak]]></dc:creator><pubDate>Sun, 13 Jan 2019 13:51:32 GMT</pubDate></item><item><title><![CDATA[Reply to Laravel API help on Sun, 13 Jan 2019 09:31:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/2">@dev_lak</a></p>
<p dir="auto">I added that bro.. Thnx</p>
]]></description><link>https://lankadevelopers.lk/post/639</link><guid isPermaLink="true">https://lankadevelopers.lk/post/639</guid><dc:creator><![CDATA[ciaompe]]></dc:creator><pubDate>Sun, 13 Jan 2019 09:31:44 GMT</pubDate></item><item><title><![CDATA[Reply to Laravel API help on Sun, 13 Jan 2019 09:27:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1">@ciaompe</a> great answer, and also your API routes must return JSON response.</p>
]]></description><link>https://lankadevelopers.lk/post/638</link><guid isPermaLink="true">https://lankadevelopers.lk/post/638</guid><dc:creator><![CDATA[dev_lak]]></dc:creator><pubDate>Sun, 13 Jan 2019 09:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to Laravel API help on Sun, 13 Jan 2019 09:30:59 GMT]]></title><description><![CDATA[<h4><strong>If you need to secure login for your mobile app then you have to use Laravel / Passport.</strong></h4>
<h3><strong>What is Laravel Passport?</strong></h3>
<hr />
<p dir="auto">APIs typically use tokens to authenticate users and do not maintain session state between requests. Laravel makes API authentication a breeze using Laravel Passport, which provides a full OAuth2 server implementation for your Laravel application in a matter of minutes. <a href="https://laravel.com/docs/5.7/passport" target="_blank" rel="noopener noreferrer nofollow ugc">learn more</a></p>
<h3><strong>What are the routes should be there in api.php</strong></h3>
<hr />
<ol>
<li>Login</li>
<li>Register</li>
<li>Other Routes on your application</li>
</ol>
<p dir="auto">ex :  post/topic, get/topic, edit/topic</p>
<p dir="auto"><a href="https://medium.com/techcompose/create-rest-api-in-laravel-with-authentication-using-passport-133a1678a876" target="_blank" rel="noopener noreferrer nofollow ugc">Source</a></p>
<h3><strong>How do I convert my existing web.php into api.php</strong></h3>
<hr />
<p dir="auto">Simply get all logics and replace all return views with json response.</p>
<h4><strong>If you looking for a basic login and create a basic API you can use Laravel Built-In Token Auth (No Package Required)</strong></h4>
<p dir="auto"><a href="https://medium.com/@danielalvidrez/how-to-use-laravels-built-in-token-auth-6b6f6c26d059" target="_blank" rel="noopener noreferrer nofollow ugc">Check This Out</a></p>
]]></description><link>https://lankadevelopers.lk/post/637</link><guid isPermaLink="true">https://lankadevelopers.lk/post/637</guid><dc:creator><![CDATA[ciaompe]]></dc:creator><pubDate>Sun, 13 Jan 2019 09:30:59 GMT</pubDate></item></channel></rss>