Yii Framework Demo Project
[Yii Framework] is a modern framework designed to be a solid foundation for your PHP application.
It's intended to show and test all Yii features.
You'll need at least PHP 8.0.
- Clone this repository.
composer updatein project root directory.
./yii serve(on Windows
yii serve). The application will be started on http://localhost:8080/.
- Go to index page. Cycle ORM will create tables, indexes and relations automatically in the configured DB.
If you want to disable this behavior then comment out line with
config/packges/yiisoft/yii-cycle/params.php. In this case you should create migrations to sync changes of entities with DB.
./yii fixture/add 20to create some random data.
Console works out of the box and could be executed with
user/create <login> <password> fixture/add [count]
In order to register your own commands, add them to
In order to run web application either built-in web server could be used by running
./yii serve or a
real web server could be pointed to
More routes could be added by editing
The template comes with ready to use Codeception configuration. In order to execute tests run:
composer run serve > ./runtime/yii.log 2>&1 & vendor/bin/codecept run
The code is statically analyzed with Psalm. To run static analysis:
Support the project
The Yii Framework Demo Project is free software. It is released under the terms of the BSD License.
LICENSE for more information.
Maintained by Yii Software.