anwar/smaregi
最新稳定版本:1.02
Composer 安装命令:
composer require anwar/smaregi
包简介
Smaregi app api implementation for laravel
README 文档
README
composer require anwar/smaregi
Environment Variables
To use the AwesomePackage, you need to add the following variables to your .env file:
SMAREGI_CONTRACT_ID=
SMAREGI_CLIENT_ID=
SMAREGI_CLIENT_SECRET=
SMAREGI_BASE_URL_FOR_TOKEN=
SMAREGI_BASE_URL=
Example
<?php namespace Anwar\Smaregi\Controller; use Anwar\Smaregi\SmaregiConnection; use App\Http\Controllers\Controller; class SmaregiController extends Controller { protected SmaregiConnection $connection; /** * @param SmaregiConnection $connection */ public function __construct(SmaregiConnection $connection){ $this->connection = $connection; } /** * GET Method example */ public function getCategories(){ return $this->connection->get('pos/categories', [ 'categoryName' => "Test categoryName by pos developer2" ]); } /** * POST method Example */ public function storeCategories(){ return $this->connection->post('pos/categories', [ "categoryName" => "Test Category" ]); } /** * DELETE method Example */ public function deleteCategory($id){ return $this->connection->delete('pos/categories', $id); } /** * PATCH method Example */ public function updateCategory($id){ return $this->connection->patch('pos/categories', $id, [ "categoryName" => "Test Category Updated" ]); } }
统计信息
- 总下载量: 56
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-12