Migrating pure PHP project to Yii framework

前端 未结 5 1627
北恋
北恋 2020-12-04 18:21

I have almost completed a PHP project, using MVC, jQuery and Ajax. It is pure PHP project. I don\'t use any frameworks in the code right know. I would like to change that.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 19:17

    In this project you converted php to yii framework. Its really easy for you if you do following step.

    Since you already have a code in mvc, things will be much easier for you to migrate. However, while migrating to Yii, since it can generate controller and model very easily using gii, you can take the advantage of it.

    second, If your database is accurate then 50% work complete.when you create CRUD operation using gii then automatically model-view-controller create.if you create mvc in php then it benifit for you.

    third,You can simply include your script for ajax, jquery and css. Those will work as well you create a folder in themes(CSS,JS,AZAX,BOOTSTRAP).

    four-Protected->view->layout, where you can change your theme..thats all

    you also help www.yiiframework.com/doc-2.0/guide-intro-yii.html

    if you think my answer is help you then rating me...thank you.

提交回复
热议问题