There is no license information available for the latest version (dev-master) of this package.

Yii demo application for active record

Installs: 27

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 5

Forks: 0

Open Issues: 5

Language:CSS

Type:project

dev-master / 1.0.x-dev 2020-12-02 16:59 UTC

README

yiisoft.png

Yii application demo for active record


Total Downloads build codecov static analysis type-coverage

docs\images\home.png

Yii demo application for active record with db-sqlite is best for rapidly creating projects.

Directory structure

  config/             contains application configurations
  resources/layout    contains layout files for the web application
  resources/mail      contains layout and view files for mailer
  resources/view      contains view files for the web application
  src/                application directory
      Action          contains web action classes
      Asset           contains assets definition
      Form            contains form models
      Module          contains modules application
      Theme           contains theme application
      Service         contains web services
      Widget          continas widgets for web application

Requirements

The minimum requirement by this project template that your Web server supports PHP 7.4.0.

Installation

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 --stability dev yii-extension/demo <your project>

Now you should be able to access the application through the following URL, assuming app is the directory directly under the public root.

Configuring your application

All the configuration is in the config directory of the application.

Run command console

./yii

Run migration

./yii migrate/up

Using PHP built-in server

php -S 127.0.0.1:8080 -t public

Wait till it is up, then open the following URL in your browser

http://localhost:8080

Includes the following features:

  • Admin Panel Dashboard.

    • /index - Display index page.
    • /about - Display about page.
    • /contact - Display contact form page.
  • User module:

    • /auth/login - Display login form.
    • /auth/logout - Logs the user out.
    • /recovery/request - Displays recovery request form.
    • /recovery/reset[/{id}/{code}] - Displays password reset form (requires id and token query params).
    • /registration/confirm[/{id}/{token}] - Confirms a user (requires id and token query params).
    • /registration/register - Displays registration form.
    • /registration/resend - Displays resend form.
    • /admin/index - Display user management interface.
    • /admin/create - Display form register user.
    • /admin/block[/{id}] - Allows you to block or unblock a user.
    • /admin/confirm[/{id}] - Confirms a user (requires id).
    • /admin/delete[/{id}] - Delete a user (requires id).
    • /admin/edit[/{id}] - Display form edit user (requires id).
    • /admin/info[/{id}] - Display info user (requires id).
    • /admin/reset[/{id}] - Send email resend password (requires id).
  • Rbac Module:

    • /item/index - Display item management interface.
    • /item/create - Display form create item.
    • /item/edit[/{id}] - Display form edit item (requires id).
    • /item/delete[/{id}] - Delete a item (requires id).

Note: check the directory /runtime/mail, the emails are stored in it.

Codeception testing

The package is tested with Codeception. To run tests:

php -S 127.0.0.1:8080 -t public > yii.log 2>&1 &
vendor/bin/codecept run

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm