This is a fork of yiisoft/yii2-app-advanced template to which I have added the following:
- 📁
api
folder as implementation of Yii2 RESTful API framework - 📁
auth
folder to provide access/refresh tokens as implementation of OAuth 2.0. (documentation and examples to be added later) - tunecino/yii2-schema-builder extension to both
frontend
andapi
apps.
The plan is to keep this fork up-to-date with official template while keep improving builder & RESTful related stuff.
If you do not have Composer, you may follow the instructions in the Yii Guide or getcomposer.org to install it.
You can then install this project template using the following command:
composer create-project --prefer-dist tunecino/yii2-app-builder your-app-name
Once the command finish go inside the created folder and init the app on dev
mode same as you usually do with the advanced template:
cd your-app-name
./init
Then create a new database and adjust related configurations in common/config/main-local.php. You may also need to set document roots of your web server as shown in the 4th step of the Preparing application section except that you'll also need to do the same for api.dev
and auth.dev
. Alternatively you can also use vagrant.
After installing the template, configuring DB and init the dev mode, go to either frontend.dev/index.php?r=builder
or api.dev/builder
, use the GUI to prototype your app then hit that Generate button. If it says DONE, the preview link of each entity should lead you to a working app.