承接 fbarachino/kalliopepbx 相关项目开发

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

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

fbarachino/kalliopepbx

最新稳定版本:1.0.1

Composer 安装命令:

composer require fbarachino/kalliopepbx

包简介

Helper to consume Kalliope's RestAPI

README 文档

README

Package per Laravel per utilizzare le RestAPI del Kalliope PBX

Usage

To use this package for laravel, follow the steps below:

  1. Install the package via Composer:

    composer require fbarachino/kalliopepbx
  2. Publish the config file:

    php artisan vendor:publish --tag=kalliopepbx-config

    and edit it with correct values.

  3. Initialize and configure the library as needed (for example):

    ...
    use Illuminate\Support\Facades\Storage;
    use fbarachino\kalliopepbx\KalliopePbx;
    
    class RestApiCall {
    
        public static function getSerialNumber()
        {
            $kalliope = new KalliopePbx();
            $response = $kalliope->sendRequest('rest/dashboard/serialNumber','GET');
            return $response;
        }
       
       // remeber to execute 'php artisan storage:link'
        public static function backup($filename, $description)
        {
            $kalliope = new KalliopePbx();
            $firmware = $kalliope->sendRequest('/rest/dashboard/firmwareVersion','GET');
            $data = 
            [
                'backup'=>
                [
                    'filename' => $filename,
                    'comment' => $description
                ],
            ];
    
            $response = json_decode($kalliope->sendRequest('rest/backup/create/'.$firmware,'POST',$data);
            return Storage::disk('local')->put('/public/backup/kalliope/'.$filename.'.bak', $response);         
        } 
    
    }
    ...
  4. You can use the helper as:

    $kalliope->sendRequest($url,$method,$data);

    Where $url is the URL of the API request, $method is the method (GET,POST,PUT,PATCH,DELETE), and $data is the array of fields.

From version 1.0.1 you can also instantiate directly if you don't want to use the config/kalliopepbx.php file:

...
$kalliope = new KalliopePbx($address,$port,$protocol,$username,$password);
...

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固