PHPackages                             buchin/kamfret - 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. [Framework](/categories/framework)
4. /
5. buchin/kamfret

ActiveLibrary[Framework](/categories/framework)

buchin/kamfret
==============

FlexcodeSDK for Laravel 4

0.1(11y ago)1322[1 issues](https://github.com/buchin/kamfret/issues)PHPPHP &gt;=5.4.0

Since Jan 21Pushed 9y ago2 watchersCompare

[ Source](https://github.com/buchin/kamfret)[ Packagist](https://packagist.org/packages/buchin/kamfret)[ RSS](/packages/buchin-kamfret/feed)WikiDiscussions master Synced 1mo ago

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

FlexcodeSDK for Laravel 4
=========================

[](#flexcodesdk-for-laravel-4)

*Unmantained*. I'm currently have no time to maintain this repo. If you are interested in maintaining this repo, please let me know.

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

[](#installation)

Begin by installing this package via Composer. Edit your project's `composer.json` file to require `buchin/kamfret`

```
"require": {
        "laravel/framework": "4.2.*",
        "zizaco/confide": "~4.0@dev",
        .
        .
        .
        "buchin/kamfret": "0.1"
    }

```

Next, update Composer through terminal:

```
composer update

```

Next, open `app/config/app.php`, and add a new item to the providers array.

```
'Buchin\Kamfret\KamfretServiceProvider'

```

Don't forget to add Kamfret in your Alias list in app/config/app.php

```
'Kamfret'    => 'Buchin\Kamfret\Facades\Kamfret'

```

Then publish buchin/kamfret config

```
php artisan config:publish buchin/kamfret

```

Edit `app/config/packages/buchin/kamfret/config.php` register your fingerprint device license like:

```
'devices' => array(
    // add device here
    array(
        'name' => 'device_name_1',
        'sn' => 'Device Serial Number',
        'vc' => 'Device Verification Code',
        'ac' => 'Device Authentication Code',
        'vkey' => 'Device Verification Key',
    ),

    array(
        'name' => 'device_name_2',
        'sn' => 'Device Serial Number',
        'vc' => 'Device Verification Code',
        'ac' => 'Device Authentication Code',
        'vkey' => 'Device Verification Key',
    ),
),

```

You may add multiple device using array. If you need device license, please watch this video on how to get those device license:

Now run a migration to the users table. We assume you already have users table. We will add `fingerprints` column to users table.

```
php artisan migrate --package="buchin/kamfret"

```

Usage
-----

[](#usage)

### Registration

[](#registration)

*Generate Registration Link*Put this code in your View to generate registration link: `{{ Kamfret::getRegistrationLink($user->id) }}`Example:

```
Register

```

Use user id as parameter

*Listen to Event and do some stuff*Registration are handled by FlexcodeSDK, and in the background, it will fire `fingerprints.register` event. We could subscribe to this event, check registration result and `echo` an URL to be openen by SDK to the user. Example: (`app/filters.php`)

```
Event::listen('fingerprints.register', function($data)
{
    // Do some stuff before informing URL to user

    // inform SDK to open this URL
    echo url('users?message=' . $data['message']);
});

```

`$data` will contain three information:

`$data['verified']` boolean whether fingerprints are successfully registered `$data['user']` contains user information from eloquent `$data['message']` contains additional message from verification, if registration unsuccessful, it will contains error message.

### Verification

[](#verification)

*Generate Verification Link*Put this code in your View to generate registration link: `{{ Kamfret::getVerificationLink($user->id, $extras) }}`Example (Simple):

```
Verify

```

Without second argument, by default will send `$extras = array('action' => 'login')`

Example (Advanced):

```
Verify Transaction

```

*Listen to the Event and do some stuff*Example (`app/filters.php`)

```
Event::listen('fingerprints.verify', function($data){
    $action = $data['extras']['action'];
    switch ($action) {
        case 'login':
            // Log user to database here, i.e: Adding new session etc.
            // Example:
            // Session::add($data['user']->id);

            // Then tell SDK to open this page
            echo action('UsersController@index', array('message' => $data['message']));
            break;

        case 'transactions.confirm':
            // mark transaction as verified, example usage:

            // $transaction = Transaction::find($data['extras']['transaction_id']);
            // $transaction->verified = true;
            // $transaction->save();

            // Then tell SDK to open this page
            echo route('transactions',
                array(
                    'message' => $data['message'],
                    'id' => $data['extras']['transaction_id'])
                );
            break;
    }
});

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

4126d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5a56c7945cd18010006a2c389215b7f08891ec437ec45c722f1f240f9133d4a?d=identicon)[buchin](/maintainers/buchin)

---

Top Contributors

[![buchin](https://avatars.githubusercontent.com/u/156540?v=4)](https://github.com/buchin "buchin (7 commits)")

### Embed Badge

![Health badge](/badges/buchin-kamfret/health.svg)

```
[![Health](https://phpackages.com/badges/buchin-kamfret/health.svg)](https://phpackages.com/packages/buchin-kamfret)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M671](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M224](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M596](/packages/laravel-ui)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)

PHPackages © 2026

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