PHPackages                             zgldh/laravel-kefu5 - 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. [API Development](/categories/api)
4. /
5. zgldh/laravel-kefu5

ActiveLibrary[API Development](/categories/api)

zgldh/laravel-kefu5
===================

Kefu5/kf5 RESTFul API for Laravel 5.1/5.2

v0.1.5(9y ago)10561MITPHP

Since Aug 15Pushed 9y ago2 watchersCompare

[ Source](https://github.com/zgldh/laravel-kefu5)[ Packagist](https://packagist.org/packages/zgldh/laravel-kefu5)[ RSS](/packages/zgldh-laravel-kefu5/feed)WikiDiscussions master Synced 2mo ago

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

laravel-kefu5
=============

[](#laravel-kefu5)

客服5的RESTFul API。 可以和 Laravel 5 框架很好的融合。

基于官方 SDK 开发，额外提供 SSO 跳转地址生成功能！

依赖 Requirement
--------------

[](#依赖-requirement)

1. Laravel 5.1/5.2

安装 Install
----------

[](#安装-install)

1. composer require zgldh/laravel-kefu5
2. config/services.php 新增配置

    ```
        'kefu5' => [
            'domain' => // 您的云客服平台kf5二级域名地址。如 abc.kf5.com 。不要带 http://， 不要带最后的斜杠
            'token' => // 您的云客服平台的API密钥。 如 '60a0319****7fcdf63461c5ad18106'
        ],
    ```
3. Done

用法 Usage
--------

[](#用法-usage)

1. 管理员查询工单列表

    ```
       use zgldh\Kefu5\Kefu5;

       $client = (new Kefu5)->withAdmin($adminEmail, $adminPassword);
       $list = $client->tickets()->findAll();
    ```
2. 客服查询工单列表

    ```
       use zgldh\Kefu5\Kefu5;

       $client = (new Kefu5)->withAgent($agentEmail, $agentPassword);
       $list = $client->tickets()->findAll();
    ```
3. 普通用户查询工单列表

    ```
       use zgldh\Kefu5\Kefu5;

       $client = (new Kefu5)->withEndUser($userEmail);
       $list = $client->requests()->findAll();
    ```
4. 更多API用法请访问：
5. 得到SSO重定向URL

    ```
       use zgldh\Kefu5\Kefu5;

       $username = \Auth::user()->name;
       $redirectURL = (new Kefu5)->sso($username,
           [
               'name'=> '用户昵称|Email',
               'phone'=> '用户的手机',
               'photo'=> '用户的头像地址，必须以http://或https://开头',
               'rememberMe'=> true 表示保持登录的连接时间至30天,false 表示30分钟后无活动自动登录过期
           ]
       );

       return redirect($redirectURL);
    ```

参考资料
----

[](#参考资料)

待续

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Every ~0 days

Total

7

Last Release

3556d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d823b6a23c0353181880a192e27ea65b9ed08387338bb78c3af727c3546f354?d=identicon)[zgldh](/maintainers/zgldh)

---

Top Contributors

[![zgldh](https://avatars.githubusercontent.com/u/312404?v=4)](https://github.com/zgldh "zgldh (2 commits)")

---

Tags

apilaravelrestfulkf5kefu5

### Embed Badge

![Health badge](/badges/zgldh-laravel-kefu5/health.svg)

```
[![Health](https://phpackages.com/badges/zgldh-laravel-kefu5/health.svg)](https://phpackages.com/packages/zgldh-laravel-kefu5)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)

PHPackages © 2026

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