简体   繁体   中英

Connect React Native app to a laravel web app with MySQL Database

I'm currently building a new project that needs a web app and mobile app and i'm forced to work with Laravel and React Native.

So my question is if I can connect between the two app's using MySQL ?

PS: I already searched and i did find this topic here , but i didn't get the idea clear.

Laravel can be just a backend and React-Native is a front-end. Your React-Native can talk to a Laravel backend without any problem or can share a database such as MySQL, it is no different then using a Node, ASP.NET, Ruby or even a Perl backend for your React-Native app to serve a REST API and connect to a database.

Not knowing the details of your website, I would look to build a REST API that can be used by React, React-Native (iOS android, or both) and the laravel based website. Certain features like authentication should easily work cross platform, other API calls may need to be tailored to Mobile vs Web. The backend can be Laravel or any other system include Node as long as it is a REST API, both the site and app will be able to use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM