cegrent / current
Current RMS Laravel 包
0.1.2
2023-08-31 08:49 UTC
Requires
- guzzlehttp/guzzle: ^7.3.0
README
这是一个轻量级的包,可以使您的 Laravel 应用程序与 Current RMS API 进行通信。
入门
将以下命令添加到您的项目中 composer require Cegrent/current dev-master
。
- 在 config/app.php 中添加
Cegrent\Current\CurrentServiceProvider::class
到 providers - 在 config/app.php 中添加
'Current' => Cegrent\Current\Current::class
到 aliases - 运行
php artisan vendor:publish
- 将 API 密钥和域名详情添加到 config/current.php
典型用法
对 /products
的 GET 请求
Current::get('/products', array('page' => '1', 'per_page' => '20', 'filtermode' => 'all'));
对 /availability/group
的 POST 请求
Current::post('/availability/group', array(), array('product_availability_view_options' => array('product_group_id' => 1)));