PHPackages                             zantknight/yii2-cam-capture - 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. zantknight/yii2-cam-capture

ActiveYii2-extension

zantknight/yii2-cam-capture
===========================

This extension is HTML5 Media Capture, integrating with yii2-gallery4

v1.0.0(6y ago)32793[1 PRs](https://github.com/zantdev/yii2-cam-capture/pulls)MITPHP

Since Apr 9Pushed 3y ago2 watchersCompare

[ Source](https://github.com/zantdev/yii2-cam-capture)[ Packagist](https://packagist.org/packages/zantknight/yii2-cam-capture)[ RSS](/packages/zantknight-yii2-cam-capture/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

A HTML5 Camera Capture
======================

[](#a-html5-camera-capture)

This extension is HTML5 Media Capture, integrating with yii2-gallery4

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist zantknight/yii2-cam-capture "*"

```

or add

```
"zantknight/yii2-cam-capture": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Note: Working on with yii2-bootstrap4 only, to shift onto bootstrap4, follow [this instruction](https://www.yiiframework.com/wiki/2556/yii2-upgrading-to-bootstrap-4/)

1. If you have not migrate gallery4 yet, simply execute migration by calling this command ```
    php yii migrate --migrationPath=@vendor/zantknight/yii2-gallery4/migrations

    ```
2. Update config/web.php ```
    return [
        ...
        'modules' => [
            'gallery4' => [
                 'class' => 'zantknight\yii\gallery\Module',
             ],
        ]
    ]
    ```
3. Put this chunk in params.php ```
     return [
         ...
         'bsVersion' => '4.x',
         ...
     ];
    ```
4. Add this behavior to your model ```
     ...
     use zantknight\yii\capture\CamCaptureBehavior;

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

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

    - fieldName = which field you want to add as picture filename
5. Put this widget into your view ```

    ```
6. Make a folder "media" under @web
7. Viola

Screenshots

- Widget [![Widget UI](https://camo.githubusercontent.com/d5d4af8cbb0a66d3bc6c2dc65b9e948d0c27fadb453e67dcb01da163b66517e6/68747470733a2f2f692e706f7374696d672e63632f4e466754744350372f48544d4c352d636170747572652e706e67)](https://camo.githubusercontent.com/d5d4af8cbb0a66d3bc6c2dc65b9e948d0c27fadb453e67dcb01da163b66517e6/68747470733a2f2f692e706f7374696d672e63632f4e466754744350372f48544d4c352d636170747572652e706e67)
- Pop-up Capture [![Pop-up Capture](https://camo.githubusercontent.com/c8b48fd3670273a28bdb1f683f5c58a8062470635fd7739a2548a7f1870409a9/68747470733a2f2f692e706f7374696d672e63632f57346d67794a326b2f48544d4c352d636170747572652d706f702d75702e706e67)](https://camo.githubusercontent.com/c8b48fd3670273a28bdb1f683f5c58a8062470635fd7739a2548a7f1870409a9/68747470733a2f2f692e706f7374696d672e63632f57346d67794a326b2f48544d4c352d636170747572652d706f702d75702e706e67)
- Image Captured to widget [![Pop-up Capture](https://camo.githubusercontent.com/adf7a1e77ff0290e03822ab3efa740846f0647e4dd01311a89e8519e9cd8f54b/68747470733a2f2f692e706f7374696d672e63632f30325471577a58782f48544d4c352d636170747572652d63617074757265642e706e67)](https://camo.githubusercontent.com/adf7a1e77ff0290e03822ab3efa740846f0647e4dd01311a89e8519e9cd8f54b/68747470733a2f2f692e706f7374696d672e63632f30325471577a58782f48544d4c352d636170747572652d63617074757265642e706e67)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2225d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fe9b685afb63ad6de74d25fca1f40c4c4b40ce0113d1e61b15b42508db26d85?d=identicon)[zantdev](/maintainers/zantdev)

---

Top Contributors

[![zantdev](https://avatars.githubusercontent.com/u/7996320?v=4)](https://github.com/zantdev "zantdev (1 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/zantknight-yii2-cam-capture/health.svg)

```
[![Health](https://phpackages.com/badges/zantknight-yii2-cam-capture/health.svg)](https://phpackages.com/packages/zantknight-yii2-cam-capture)
```

###  Alternatives

[hail812/yii2-adminlte-widgets

yii2 adminlte widgets

10246.8k4](/packages/hail812-yii2-adminlte-widgets)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
