Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
96 lines (61 sloc) 2.59 KB

Yii 2 Advanced 4 Ends v0.1.1

License Total Downloads Monthly Downloads Latest Stable Version Latest Unstable Version

Additions for giving Yii2 API & assets application ends.


One... create a new Yii2 Advanced project by running...

composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application

Two Before running init, either...

Depending on your Composer setup, run one of the following commands:

composer require p2made/yii2-a4e "^0.1"


php composer.phar require p2made/yii2-a4e "^0.1"

or add:

	"p2made/yii2-a4e": "^0.1"

to the requires section of your composer.json & run composer update.

yii2-a4e installs...


Three... run...

cp -r ./vendor/p2made/yii2-a4e/environments ./

The environments folder will be replaced.

Four... run ./init as usual.

Init to dev will replace some files. Select All when prompted. If you're going straight to a prod install for any reason, init to dev first so that these files do get replaced.

You now have application ends folders...


If there are any application ends that you won't use, you can delete those folders, along with some extra deletions in config edits that follow.

Four... edit some config files...

In common/config/bootstrap.php edit the last line...

	Yii::setAlias('assetsUrl', '');

to have the URL for your static/assets application end.

If you're discarding any ends, delete the lines setting aliases for them.

In common/config/main.php edit the $_urlBase... values at the top according to your server configuration.

If you're discarding any ends, delete the corresponding lines here, & also the lines below settung urlManagers for them.

In common/config/params.php edit the reverseDomain value according to your server configuration.

You can’t perform that action at this time.