定制 anwar/smaregi 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固