PHPackages                             sergmoro1/yii2-modal-crud - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sergmoro1/yii2-modal-crud

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

sergmoro1/yii2-modal-crud
=========================

Add and update models in a modal window.

v1.0.0(6y ago)02472MITPHPPHP &gt;=5.4.0

Since Aug 31Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sergmoro1/yii2-modal-crud)[ Packagist](https://packagist.org/packages/sergmoro1/yii2-modal-crud)[ RSS](/packages/sergmoro1-yii2-modal-crud/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (2)

Yii2 module for editing models table in a modal window
======================================================

[](#yii2-module-for-editing-models-table-in-a-modal-window)

Installation
------------

[](#installation)

The preferred way to install this extension is through composer.

Either run

`composer require --prefer-dist sergmoro1/yii2-modal-crud`

or add

`"sergmoro1/yii2-modal-crud": "^1.0"`

to the require section of your composer.json.

Usage
-----

[](#usage)

For example, there is a model `Property` with two fields: `id`, `name`.

\###Controller

```
namespace backend\controllers;

use sergmoro1\modal\controllers\ModalController;

use common\models\Property;
use common\models\PropertySearch;

class PropertyController extends ModalController
{
    public function newModel() { return new Property(); }
    public function newSearch() { return new PropertySearch(); }
}
```

\###View

Only matters `index.php`. Other are ordinary.

```
