Convert from Core PHP to Laravel framework [closed]

↘锁芯ラ 提交于 2019-12-20 06:36:35

问题


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


回答1:


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.

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

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

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.

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.

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.



来源:https://stackoverflow.com/questions/36668773/convert-from-core-php-to-laravel-framework

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!