Yii Framework REST API Application Base
- dev-master / 3.0.x-dev
This package is auto-updated.
Last update: 2020-03-24 15:18:22 UTC
This package is Yii Framework REST API application best for rapidly creating projects.
The template includes all commonly used configurations that would allow you to focus on adding new features to your application.
bin/ config/ contains application configurations runtime/ contains files generated during runtime src/ controllers/ contains Api controller classes models/ contains model classes tests/ contains various tests for the basic application vendor/ contains dependent 3rd-party packages .env .env.dist composer.json
The minimum requirement by this project template that your Web server supports PHP 7.4.
You can then install this project template using the following command:
composer create-project --prefer-dist --stability=dev yiisoft/app myapp cd myapp ./vendor/bin/yii serve
Now you should be able to access the application via
Edit the file
config/db.php with real data, for example:
return [ '__class' => \Yiisoft\Db\Connection::class, 'dsn' => 'mysql:host=localhost;dbname=yii2basic;charset=utf8', 'username' => 'root', 'password' => '1234', ];
- 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
config/directory to customize your application as required.
- Refer to the README in the
testsdirectory for information specific to basic application tests.
Tests are located in