PHP code example of kv4nt / yii2repeater

1. Go to this page and download the library: Download kv4nt/yii2repeater library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kv4nt / yii2repeater example snippets


 echo Repeater::widget([
        'modelView' => '@app/modules/admin/views/***/repeater_view_file',
        'appendAction' => \yii\helpers\Url::to(['add-item-action']),
        'removeAction' => \yii\helpers\Url::to(['remove-item-action']),
        'form' => $form,
        'models' => $models, //The existing related model | example: $model->items
    ])