Yii 1 running inside Yii 2

I have a requirement to develop a REST api for an existing Yii 1.1 app using Yii 2. Yii 2 will be the front app which will handle the request and then use the existing Yii 1.1 app for processing/information retrieval.

The example provided in the Yii 2 Guide is having Yii 2 app running inside Yii 1 where Yii 1 will be the front app receiving the requests. And my requirement is the other way round.

Any help is appreciated.

IF you want to develop a application based on REST , you may use any of the framework(Yii1, Yii2, cakePHP, Laravel…) for both frontend and backend.

Your question is not clear about requirements,

REST is not depend on frameworks,

it only depend on request and responses.

My requirement is, I have to use the existing Yii 1.1 app for processing the request. So it is better to do a Yii based REST api which will utilize the existing Yii 1.1 app.

Yes You can, But it will take more work on your Yii1 application views. Just like complete rework.

Please let me know if anybody else have any ideas regarding this. Thanks!