0

I am working on a project in which I have to provide services to a mobile app. Services like sign up, login etc.

I was studying Laravel 5.3 routes. There are two main types of routes: web routes and API routes. I read about these but I am still confused about my situation.

I am new to Laravel so my question is which facility is better in my situation.

And any advice on providing services for mobile app will be helpful.

DimaSan
  • 12,264
  • 11
  • 65
  • 75
  • You could use the web routes for this, but this use case is more or less what the API routes are designed for - you'll get token support, statelessness, etc, and will probably be closer to what you need out of the box. – samiles Oct 24 '16 at 14:06

1 Answers1

0

My advise to you would be to use Laravel as an API service and create all your routes in API

from your iOS app you would then send requests to your Laravel server via the /api routes and perform the necessary logic

this way all your logic resides on your Laravel server which means you can make your iOS app as dumb as possible, being only responsible for showing something visual, and communicating with your server for any information it requires

if you don't need all the features of Laravel to do this i would recommend using the Lumen framework, which is a stripped down version of laravel made for API work

WebKenth
  • 126
  • 1
  • 1
  • 9