yii-extension / demo
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
Requires
- php: ^7.4|^8.0
- lasserafn/php-initial-avatar-generator: ^4.1
- npm-asset/axios: ^0.21.0
- npm-asset/buefy: 0.9.4
- npm-asset/bulma-switch: ^2.0.0
- npm-asset/vue: 2.6.12
- nyholm/psr7: ^1.3.0
- symfony/console: ^5.0
- yii-extension/fontawesome: ^1.0@dev
- yiisoft/active-record: ^3.0@dev
- yiisoft/aliases: ^1.0
- yiisoft/assets: ^1.0@dev
- yiisoft/auth: ^1.0
- yiisoft/cache: ^3.0@dev
- yiisoft/cache-file: ^3.0@dev
- yiisoft/composer-config-plugin: ^1.0@dev
- yiisoft/csrf: ^3.0@dev
- yiisoft/data-response: ^3.0@dev
- yiisoft/db-sqlite: ^3.0@dev
- yiisoft/di: ^3.0@dev
- yiisoft/error-handler: ^3.0@dev
- yiisoft/form: ^1.0@dev
- yiisoft/log: ^3.0@dev
- yiisoft/log-target-file: ^3.0@dev
- yiisoft/mailer: ^3.0@dev
- yiisoft/mailer-swiftmailer: ^3.0@dev
- yiisoft/middleware-dispatcher: ^1.0@dev
- yiisoft/profiler: ^3.0@dev
- yiisoft/router: ^3.0@dev
- yiisoft/router-fastroute: ^3.0@dev
- yiisoft/session: ^3.0@dev
- yiisoft/user: ^3.0@dev
- yiisoft/view: ^3.0@dev
- yiisoft/widget: ^3.0@dev
- yiisoft/yii-bulma: ^1.0@dev
- yiisoft/yii-db-migration: ^1.0@dev
- yiisoft/yii-web: ^3.0@dev
- yiisoft/yii-widgets: ^3.0@dev
Requires (Dev)
- codeception/c3: ^2.6.0
- codeception/codeception: ^4.1.5
- codeception/module-asserts: @dev
- codeception/module-db: ^1.0
- codeception/module-phpbrowser: @dev
- phpunit/phpunit: ^9.3
- roave/security-advisories: dev-master
- vimeo/psalm: ^4.0
This package is auto-updated.
Last update: 2024-11-22 00:07:27 UTC
README
Yii application demo for active record
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