Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

msaad's avatar
Level 1

Mobile App Backend in Laravel 8

Hello Friends, How Are You?

I want to ask I can we write a mobile app backend in laravel 8?

If yes :) can you provide me best source?

If not :( then plz suggest the easiest and fastest way to write backend and best language also to write backend. (I have frontend design)

Thanks

0 likes
8 replies
tykus's avatar

You can easily create a RESTful JSON API using Laravel to serve you mobile application. Laravel provides API Resources to allow you define the structure for your responses. Authentication can be handled by Sanctum if needed. Other than that there is nothing especially different from any MVC application; you define Models, routes, and Controller actions (which return the Resources rather than Views) necessary to solve your business needs.

2 likes
msaad's avatar
Level 1

@tykus

Hello Brother. How Are You?

I have a project to develop an already existing website, which is developed in Laravel 8. This website is an online food ordering system that contains its data on food items and others in the MySQL database. Plz, Guide me about the best way to develop an app for that website. And can I use MySQL database for app data? Please help me and guide me about the best technology to use for both Apple(IOS) and android.

Thanks

1 like
martinbean's avatar

Plz, Guide me about the best way to develop an app for that website.

@msaad Open a text editor and start writing code for your app.

1 like
Foks's avatar

On the Laravel Sanctum documentation, they actually provide a way to authenticate a user and issue an API token for that user.

1 like
NimaTF's avatar

Hello msaad!

You can write API with Laravel Sanctum & Laravel Passport:

In Laravel documentation Laravel Sanctum suggested for mobile applications/ SPA with different Laravel Passport provides a full OAuth2 server implementation. Laravel doc:

If your application absolutely needs to support OAuth2, then you should use Laravel Passport.

However, if you are attempting to authenticate a single-page application, mobile application, or issue API tokens, you should use Laravel Sanctum. Laravel Sanctum does not support OAuth2; however, it provides a much simpler API authentication development experience.

Read this too. https://laravel.com/docs/8.x/passport#passport-or-sanctum

I hope I helped.

2 likes

Please or to participate in this conversation.