https://github.com/yiisoft/yii-base-cli
Yii Framework Command Line Application
https://github.com/yiisoft/yii-base-cli
Last synced: 5 months ago
JSON representation
Yii Framework Command Line Application
- Host: GitHub
- URL: https://github.com/yiisoft/yii-base-cli
- Owner: yiisoft
- License: bsd-3-clause
- Archived: true
- Created: 2018-11-19T09:06:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-23T15:59:20.000Z (about 6 years ago)
- Last Synced: 2024-04-13T22:57:39.974Z (about 1 year ago)
- Language: PHP
- Homepage: https://www.yiiframework.com/
- Size: 34.2 KB
- Stars: 26
- Watchers: 22
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
Yii Framework Command Line Application
This package is [Yii Framework] Command Line 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.[Yii Framework]: http://www.yiiframework.com/
[](https://packagist.org/packages/yiisoft/yii-base-cli)
[](https://packagist.org/packages/yiisoft/yii-base-cli)
[](https://travis-ci.com/yiisoft/yii-base-cli)DIRECTORY STRUCTURE
-------------------```
config/ contains application configurations
runtime/ contains files generated during runtime
src/
commands/ contains console commands (controllers)
tests/ contains various tests for the basic application
vendor/ contains dependent 3rd-party packages
.env
.env.dist
composer.json
```REQUIREMENTS
------------
The minimum requirement by this project template that your Web server supports PHP 7.2.
INSTALLATION
------------If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions
at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).You can then install this project template using the following command:
~~~
composer create-project --prefer-dist --stability=dev yiisoft/yii-base-cli myapp
cd myapp
./vendor/bin/yii serve
~~~Now you should be able to access the application via `http://localhost:8080/`.
CONFIGURATION
-------------### Database
Edit the file `config/db.php` with real data, for example:
```php
return [
'__class' => \Yiisoft\Db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=yii2basic;charset=utf8',
'username' => 'root',
'password' => '1234',
];
```**NOTES:**
- 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 `tests` directory for information specific to basic application tests.TESTING
-------Tests are located in `tests` directory.