LaravelPackages.net
Acme Inc.
Toggle sidebar
idekite/flexcodesdk

:description

125
3
2.1.0
About idekite/flexcodesdk

idekite/flexcodesdk is a Laravel package for :description. It currently has 3 GitHub stars and 125 downloads on Packagist (latest version 2.1.0). Install it with composer require idekite/flexcodesdk. Discover more Laravel packages by idekite or browse all Laravel packages to compare alternatives.

Last updated

flexcodesdk

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require idekite/flexcodesdk:dev-master

Usage

Publish Vendor

$ php artisan vendor:publish

Choose 'flexcodesdk-config' and 'flexcodesdk-models'

Migrate Database

$ php artisan:migrate

Blade

{{ flexcodesdk::getRegistrationLink($user_id) }}

Edit app/Providers/EventServiceProvider.php

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

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


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('testController@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;
    }
});

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.

Star History Chart