Yii 2 Shared Project Template
- php: >=5.4.0
- yiisoft/yii2: >=2.0.5
- yiisoft/yii2-bootstrap: *
- yiisoft/yii2-swiftmailer: *
This package is not auto-updated.
Last update: 2023-03-18 10:24:49 UTC
Yii 2 Shared Project Template is a skeleton Yii 2 application best for rapidly creating small projects for shared hosting.
The template contains the basic features including user login/logout and a contact page. It includes all commonly used configurations that would allow you to focus on adding new features to your application.
The minimum requirement by this project template that your Web server supports PHP 5.4.0.
Install via Composer
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
You can then install this project template using the following command:
php composer.phar global require "fxp/composer-asset-plugin:~1.1.0" php composer.phar create-project --prefer-dist cherif/yii2-app-shared shared
Now you should be able to access the application through the following URL, assuming
shared is the directory
directly under the Web root.
Edit the file
config/db.php with real data, for example:
return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=yii2shared', 'username' => 'root', 'password' => '1234', 'charset' => 'utf8', ];
- Yii won't create the database for you, this has to be done manually before you can access it.
- Check and edit the other files in the
protected/config/directory to customize your application as required.
- Refer to the README in the
testsdirectory for information specific to shared application tests.