idekite / flexcodesdk
:描述
2.1.0
2018-09-05 08:08 UTC
Requires
Requires (Dev)
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~6.0
README
这里应该放您的描述。请查看 contributing.md 以查看待办事项列表。
安装
通过 Composer
$ composer require idekite/flexcodesdk:dev-master
使用
发布供应商
$ php artisan vendor:publish
选择 'flexcodesdk-config' 和 'flexcodesdk-models'
迁移数据库
$ php artisan:migrate
Blade
{{ flexcodesdk::getRegistrationLink($user_id) }}
编辑 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; } });
变更日志
请参阅 changelog 以获取最近更改的更多信息。
测试
$ composer test
贡献
请参阅 contributing.md 以获取详细信息及待办事项列表。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 feriharjulianto@gmail.com 联系,而不是使用问题跟踪器。
鸣谢
许可证
MIT。请参阅 许可证文件 以获取更多信息。