The skeleton of Yii 2 application best for rapidly creating your projects.
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.
assets
the source scripts, styles and etc.config
the application configurationsmessages
the I18n translationsmigrations
the database migrations (namespaceapp\migrations
)modules
the application modules (namespaceapp\modules
)public
the front-end entry script and assetsbackend
the backend-end entry script and assets
runtime
the cache and logssrc
the PHP sources (classes, interfaces and traits in namespaceapp
)commands
the CLI controllers (running byyii
script)controllers
the Web controllersmodels
the models
tests
the unit testsvendor
the required 3rd-party packagesviews
the views/templatesmails
the e-mail viewslayouts
the page layouts
The minimum requirement by this project template that your server supports PHP 7.4.
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:
composer create-project --prefer-dist ensostudio/yii2-app your-app
Now you should be able to access the application through the following URL, assuming your-app
is the directory
directly under the Web root.
http://localhost/your-app/public/
Edit the file config/db.php
with real data.
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.
Tests are located in tests
directory. They are developed with PHPUnit.
Edit the file config/test.php
and tests/bootstrap.php
to configure your test application.
Tests can be executed by running
composer run tests