简体   繁体   English

使用Laravel基于Web的移动应用程序

[英]Mobile application web-based using Laravel

Is it possible to make a web-based mobile application using a big project made in Laravel? 是否可以使用Laravel制作的大型项目制作基于Web的移动应用程序? Do I need to start it from scratch in Cordova? 我需要在Cordova中从头开始吗? Please let me know how, if it is possible. 如果可以的话,请告诉我如何。

You could use the Laravel project only as an API to get and deliver data from and to the application. 您只能将Laravel项目用作API,以从应用程序获取数据或向应用程序传递数据。

If you have based your Laravel project on API, then this should be as easy as integrating with the web application. 如果您的Laravel项目基于API,那么这应该与与Web应用程序集成一样容易。 Otherwise, you'll have to build an API especially for the mobile app. 否则,您将必须构建专门用于移动应用程序的API。

You can use Laravel as your API backend and use the Cordova/Ionic or the native libraries to consume your API from the front-end. 您可以将Laravel用作API后端,并使用Cordova / Ionic或本机库从前端使用您的API。

Basically, have all your apps (mobile and web) use the same REST API, however you choose to program them. 基本上,让所有应用程序(移动和Web)都使用相同的REST API,但是您可以选择对它们进行编程。 This will make your life easier and give you loose coupling. 这将使您的生活更轻松,并使您的耦合松散。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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