如何从 Laravel Web 应用程序创建一个 android 应用程序?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29046861/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 11:08:15  来源:igfitidea点击:

How can I create a android app from laravel web application?

androidlaravelweb-applicationsmobile-application

提问by Nicson Nicolas

I would like to ask if there is a possibility to create an android app based from the laravel web application? I don't know where to start, and give me some suggestions for creating a mobile app?

我想问一下是否有可能从 Laravel Web 应用程序创建一个基于 android 的应用程序?我不知道从哪里开始,给我一些创建移动应用程序的建议?

Thanks,

谢谢,

采纳答案by nuuneoi

Laravel is good for server side application but isn't made for the front-end application so I suggest you to choose another way to develop your app.

Laravel 适用于服务器端应用程序,但不适用于前端应用程序,因此我建议您选择另一种方式来开发您的应用程序。

If you do want to stick with web technology, try to use PhoneGap which use HTML5 and Javascript to develop application.

如果您确实想坚持使用网络技术,请尝试使用使用 HTML5 和 Javascript 开发应用程序的 PhoneGap。

回答by jumper rbk

If you have a business process already done and want to use that in you native android app, you can create a REST interface to that laravel business process. So you don't have to throw it away and start from scratch.

如果您已经完成了一个业务流程并希望在您的原生 android 应用程序中使用它,您可以为该 Laravel 业务流程创建一个 REST 接口。所以你不必扔掉它并从头开始。

Using REST interface to your server code will make it universally accessible to any app that use web connection for data fetching.

对您的服务器代码使用 REST 接口将使任何使用 Web 连接获取数据的应用程序都可以普遍访问它。

You can create an SPA using HTML5, javascript and bootstrap css - a single page application that is responsive and running in mobile browser that connect to your laravel REST function or you can develop a native app using android studio, phonegap or any native android dev and still can connect to your laravel through the REST interface.

您可以使用 HTML5、javascript 和 bootstrap css 创建一个 SPA——一个响应并在移动浏览器中运行的单页应用程序,连接到您的 Laravel REST 功能,或者您可以使用 android studio、phonegap 或任何本机 Android 开发和开发本机应用程序和仍然可以通过 REST 接口连接到你的 Laravel。