承接 peteradeojo/laas-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

peteradeojo/laas-php-sdk

最新稳定版本:v2.2.1

Composer 安装命令:

composer require peteradeojo/laas-php-sdk

包简介

A PHP SDK for the LAAS API

README 文档

README

Laas is a PHP package for sending logs to the LAAS API.

Installation

You can install Laas using Composer:

composer require peteradeojo/laas

Usage

First, you need to create an instance of the Laas class:

$laas = Laas::getInstance();

Then, you can use the sendLog method to send a log to the LAAS API:

$log = new LaasLogDTO();
$log->level = 'info';
$log->message = 'This is a test message';

$response = $laas->sendLog($log);

The sendLog method returns a Guzzle HTTP response, which you can use to check the status code and response body (or you can completely ignore it).

How to get the LAAS_APP_TOKEN

To get the app token you will need to

  1. visit Lags
  2. Create an account on the platform
  3. Log in to the account you just created
  4. Create an app from your dashboard and put in the name for the app e.g Hotel system
  5. click on generate token
  6. copy the token generated and use it in your application.

Note: Make sure to set the LAAS_APP_TOKEN environment key before using the sendLog method.

Contributing

Contributions are welcome! If you find a bug or want to add a new feature, please open an issue or submit a pull request.

License

Laas is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-12