yii-demo

by yiisoft

yiisoft /yii-demo

Yii 3 demo application

168 Stars 62 Forks Last release: Not found 283 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Yii Framework

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.

Latest Stable Version Total Downloads Build Status

Installation

You'll need PHP 7.4. Additionally, NodeJs is used in this repository to fetch assets, so it should be installed.

  1. Clone this repository.
  2. Configure
    config/params.php
    . You can skip this step.
  3. Run
    composer install
    in project root directory.
  4. Run
    ./vendor/bin/yii serve
    or start your web-server setting up
    public
    directory as webroot.
  5. 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
    Generator\SyncTables::class
    in the
    config/params.php
    . In this case you should create migrations to sync changes of entities with DB.
    1. Run
      ./vendor/bin/yii fixture/add 20
      to create some random data.

Console

Console works out of the box and could be executed with

./vendor/bin/yii
.

Some commands:

user/create  
fixture/add [count]

In order to register your own commands, add them to

console/params.php
,
console
commands
section.

Web application

In order to run web application either built-in web server could be used by running

./vendor/bin/yii serve
or a real web server could be pointed to
/public/index.php
.

More routes could be added by editing

src/Factory/AppRouterFactory
.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.