从Core PHP转换为Laravel框架 [英] Convert from Core PHP to Laravel framework

查看:68
本文介绍了从Core PHP转换为Laravel框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Core PHP Web应用程序转换为Laravel Framework.有没有可用的工具来做到这一点?或者是否有任何程序可以使此操作变得容易和容易.我需要在短时间内进行转换.建议我在短时间内进行此转换的所有可能性

How to convert a Core PHP web application to Laravel Framework. Is there any tool available to do that? Or is there any procedure to make this possible and easier. I am in need of converting this with in a short duration. Suggest me with all the possibilities of this conversion within short duration

推荐答案

正如ceejayoz所提到的,这不是一个超快速的过程,鉴于这种情况,您将很难被迫寻找可以为您执行此操作的工具该过程涉及确保所有功能和代码都放置在正确的位置.

As ceejayoz has mentioned, this isn't a super quick process and you'd be very hard pressed to find a tool that could perform this for you given that the process involves making sure all your functions and code ends up in the right place.

通常来说,核心PHP在每个页面内或其中的外部资源中都有许多代码可以处理所有逻辑.

Generally speaking, core PHP has a lot of code inside each page, or inside resources outside of this that handle all the logic.

Laravel将所有这些抽象出来,并将您的代码组织到有意义的特定文件中.

Laravel abstracts all of this and organises your code in to meaningful and specific files.

例如,您有一个routes.php文件,该文件将请求定向到适当的功能-通常存储在Controllers中.以前,您只需转到文件夹内的下一个页面名称即可.

For example, you have a routes.php file which directs requests to the appropriate functions - usually stored in Controllers. Whereas previously you could just go to the next page name inside your folder.

然后,您将拥有包含函数的Controller,这些Controller通常会返回视图(即您所看到的视图).

You then have Controllers that contain functions, that usually return views (which are what you see).

取决于当前应用程序的大小,这将决定您需要花费多少时间.

Depending on how large your current application is will dictate how much time this will take for you.

但是,我建议您阅读 docs ,并可能尝试安装Laravel以了解一下怎么运行的.感到舒适之后,就可以开始将Core PHP Web应用程序移植到Laravel.

However, I suggest you read up on the docs and maybe trial installing Laravel to get a feel for how it works. Once you're comfortable you can begin porting your Core PHP web application over to Laravel.

在大多数情况下,您的代码将是可转让的-您只需要找到合适的位置来弹出它即可.

For the most part, your code will be transferable - you just have to find the right place to pop it.

这篇关于从Core PHP转换为Laravel框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆