PHP code example of zantknight / yii2-cam-capture

1. Go to this page and download the library: Download zantknight/yii2-cam-capture 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/ */

    

zantknight / yii2-cam-capture example snippets


   return [
       ...
       'modules' => [
           'gallery4' => [
                'class' => 'zantknight\yii\gallery\Module',
            ],
       ]
   ]
   

    return [
        ...
        'bsVersion' => '4.x',
        ...
    ];
   

    ...
    use zantknight\yii\capture\CamCaptureBehavior;

    class YourModel extends \yii\db\ActiveRecord
    {
        ...

        public function behaviors()
        {
            return [
                ...
                [
                    'class' => CamCaptureBehavior::className(),
                    'model' => $this,
                    'fieldName' => 'name'
                ]
                ...
            ];
        }
    }
   

    <?= \zantknight\yii\capture\CamCaptureWidget::widget([
        'ownerModel' => $model
    ]); 

php composer.phar 

   php yii migrate --migrationPath=@vendor/zantknight/yii2-gallery4/migrations