PHPackages                             deathkel/apitest - 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. deathkel/apitest

ActiveLibrary[API Development](/categories/api)

deathkel/apitest
================

Simple API TEST tool for Laravel REST

0.1.2(8y ago)11104MITCSSPHP &gt;=7.0

Since Aug 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/deathkel/apitest)[ Packagist](https://packagist.org/packages/deathkel/apitest)[ Docs](https://github.com/deatkel/apitest)[ RSS](/packages/deathkel-apitest/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

APITEST
=======

[](#apitest)

轻量级laravel REST接口测试工具
=====================

[](#轻量级laravel-rest接口测试工具)

用于查看和测试后端REST接口

[![Latest Version on Packagist](https://camo.githubusercontent.com/433c11b28ef7e217a4eaacc10d243f3992f6bb6a96733a0dbd17de2769428660/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656174686b656c2f617069746573742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/deathkel/apitest)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/7bfc96161ca866ded30dc6ca3e9ea81ce4c1529c4c949b06afbddb9622665ab7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656174686b656c2f617069746573742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/deathkel/apitest)

版本要求
====

[](#版本要求)

laravel &gt;= 5.1,php &gt; 7

安装
--

[](#安装)

```
composer require deathkel/apitest

```

### 使用

[](#使用)

请到注册服务提供者到Laravel服务提供者列表中。 方法1： 在config/app.php配置文件中，key为'providers'的数组中添加服务提供者

```
        'providers'=>[
            //...
            Deathkel\Apitest\ApiTestServiceProvider::class
        ]
```

运行 'php artisan vendor:publish'将视图文件和静态文件发布到你们的项目中，请确保文件夹resource/views/api和public/api文件夹为空。 否则请自行复制使用本项目frotend文件中的blade和静态文件

#### Route配置示例

[](#route配置示例)

请配置在debug模式开启下的路由，不要再生产环境中使用

```
    if (config('app.debug')) {
        Route::get('apitest','ApiTestController@index');
    }

```

#### 控制器示例

[](#控制器示例)

```
    use Deathkel\Apitest\ApiReflection;

    class ApiTestController extend Controller{
        public function index(){
            $reflection=new ApiReflection();
            $api=$reflection->getApi();
            $apiToString=json_encode($api);

            return view('api.index', ['api' => $api,'apiToString'=>$apiToString]);
        }
    }

```

#### 默认加载所有控制器，你可以使用setConfig()方法来手动设置要加载的控制器，

[](#默认加载所有控制器你可以使用setconfig方法来手动设置要加载的控制器)

```
    private function config(){
        return [
            'App\Http\Controllers\IndexController',
            'App\Http\Controllers\HomeController',
        ];
    }

    .....
    $reflection=new ApiReflection();
    $reflection->setConfig($this->config());
    $api=$reflection->getApi();
    .....

```

### 界面示例

[](#界面示例)

[![](img/api.jpeg?raw=true)](img/api.jpeg?raw=true)
---------------------------------------------------

[](#)

### 注释说明

[](#注释说明)

#### `@apiTest` : apiTest功能标识

[](#apitest--apitest功能标识)

- 添加了该参数才能使用该工具的其他功能。否则注释只能以文本格式展示(可用于兼容老的注释)

#### `@param {参数格式} {参数} {简单说明}` : 查询参数

[](#param-参数格式-参数-简单说明--查询参数)

- 参数格式:自定义参数的格式名称。如（int|string|可选）等等
- 参数名称:查询参数的名称。如name,title等等
- 简单说明:随意写点吧

> 注意用一个`空格`分割

#### `@{任意名称}` : 任意注释

[](#任意名称--任意注释)

- 如`author` `version` ...

> 注意名称和说明之间用一个`空格`分割

#### 写法示例

[](#写法示例)

```
/**
 * @apiTest
 * @param nullable|int name 名称
 * @说明 这个是index方法
 * @随便啥玩意 随便啥的说明
 * 随便啥的说明第二行
 * -#-%^&*;a'd--符号啥的也都可以
 * @又一个名称
 * 又一个名称的注释
 * @author kel
 * @version 1.0.0
 */
public function index(){

}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~226 days

Total

4

Last Release

2955d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.4.0

0.1.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14328715?v=4)[KEL](/maintainers/deathkel)[@deathkel](https://github.com/deathkel)

---

Top Contributors

[![deathkel](https://avatars.githubusercontent.com/u/14328715?v=4)](https://github.com/deathkel "deathkel (45 commits)")

---

Tags

api-documentationdocumentslaravel-packagereflectiontesting-tools

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/deathkel-apitest/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)

PHPackages © 2026

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