wjh / tuling
laravel 图灵机器人
v0.1.2
2018-01-16 10:27 UTC
Requires
- php: >=5.6
- illuminate/support: ~v5.5
- php-curl-class/php-curl-class: ^7.2
This package is not auto-updated.
Last update: 2024-04-28 03:03:44 UTC
README
关于
Tuling robot是对图灵机器人的封装,提供一种简洁的方式,可以很方便的在你的框架中使用
安装方法
在你的composer.json
中引用 wjh/tuling
,然后更新依赖关系:
$ composer require wjh/tuling
在config/app.php
服务提供者数组中添加Wjh\Tuling\ServiceProvider
Wjh\Tuling\ServiceProvider::class,
使用方法
$tuling = new Wjh\Tuling\Tuling($appUrl, $appKey, new Curl\Curl()); $tuling->handle();
配置文件
默认的配置文件在config/tuling.php,复制该文件到你的文件夹中并修改,发布配置文件通过以下命令:
php artisan vendor:publish --provider="Wjh\Tuling\ServiceProvider"
app_url和app_key可以到图灵官网上申请
return [ 'app_url' => env('tuling_app_url'), 'app_key' => env('tuling_app_key'), ];