faytzel/laravel-latch 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

faytzel/laravel-latch

Composer 安装命令:

composer require faytzel/laravel-latch

包简介

Latch integration in Laravel

README 文档

README

Installation

Laravel 5

Require this package in your composer.json and run composer update:

"faytzel/laravel-latch": "1.*"

After updating composer, add the Service Provider to the providers array in config/app.php

'Faytzel\LaravelLatch\LaravelLatchServiceProvider',

You add config files.

php artisan vendor:publish

If you want to use the facade, add this to your facades in config/app.php

'Latch' => 'Faytzel\LaravelLatch\Facades\LaravelLatch',

Laravel 4

Require this package in your composer.json and run composer update:

"faytzel/laravel-latch": "0.*"

After updating composer, add the Service Provider to the providers array in app/config/app.php

'Faytzel\LaravelLatch\LaravelLatchServiceProvider',

You add config files.

php artisan config:publish faytzel/laravel-latch

If you want to use the facade, add this to your facades in app/config/app.php

'Latch' => 'Faytzel\LaravelLatch\Facades\LaravelLatch',

Examples

Pair with Latch Account

$token = Input::get('token');

if ($accountId = Latch::pair($token))
{
    // Add account id latch to user table
}
else
{
    echo Latch::error();
}

Check it if locked Latch Account

$accountId = 'latch_account_id';

if ( ! Latch::locked($accountId))
{
    // Auth user
}

Check if unlocked Latch Account

$accountId = 'latch_account_id';

if (Latch::unlocked($accountId))
{
    // Auth user
}

Unpair Latch Account

$accountId = 'latch_account_id';

if (Latch::unpair($accountId))
{
    // Delete account id latch in user table
}
else
{
    echo Latch::error();
}

统计信息

  • 总下载量: 760
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固