laravel-admin-ext/api-tester

laravel 的 API 测试器

v1.0.4 2020-09-11 04:45 UTC

This package is auto-updated.

Last update: 2024-09-11 13:35:45 UTC


README

StyleCI Packagist Total Downloads Pull request welcome

灵感来源于 laravel-api-tester.

英文文档 | 中文文档

截图

wx20170809-164424

安装

$ composer require laravel-admin-ext/api-tester -vvv

$ php artisan vendor:publish --tag=api-tester

然后运行以下命令导入菜单和权限

$ php artisan admin:import api-tester

最后打开 http://localhost/admin/api-tester.

配置

api-tester 支持三种配置,打开 config/admin.php 找到 extensions

    'extensions' => [
    
        'api-tester' => [
        
            // route prefix for APIs
            'prefix' => 'api',

            // auth guard for api
            'guard'  => 'api',

            // If you are not using the default user model as the authentication model, set it up
            'user_retriever' => function ($id) {
                return \App\User::find($id);
            },
        ]
    ]

许可证

MIT 许可证 (MIT) 下授权。