nyx-solutions/yii2-nyx-mvc

Yii2 NYX MVC

5.0.0 2022-06-02 14:35 UTC

This package is auto-updated.

Last update: 2024-11-30 01:41:57 UTC


README

NYX MVC adds more functionality to the following YII2 MVC Classes: \yii\base\Model, \yii\db\ActiveRecord, \yii\web\Controller and \yii\web\View.

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nyx-solutions/yii2-nyx-mvc "*"

or add

"nyx-solutions/yii2-nyx-mvc": "*"

to the require section of your composer.json file.

Usage

Models

Just use extends in your base class:

class Model extends \nyx\mvc\base\Model
{
}

ActiveRecord Models

Just use extends in your base class:

class ActiveRecordModel extends \nyx\mvc\base\ActiveRecord
{
}

Controllers:

Just use extends in your base class:

class Controller extends \nyx\mvc\web\Controller
{
}

Views:

Just use extends in your base class:

namespace frontend\components\web;

class View extends \nyx\mvc\web\View
{
}

And configure your View in the components section of your Yii2 configuration file.

'components' => [
    'view' => [
        'class' => 'frontend\components\web\View'
    ]
]

License

yii2-nyx-mvc is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

Yii2