承接 homedoctor-es/laravel-holded 相关项目开发

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

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

homedoctor-es/laravel-holded

最新稳定版本:1.0.3

Composer 安装命令:

composer require homedoctor-es/laravel-holded

包简介

Laravel integration of the [Holded PHP SDK](https://github.com/homedoctor-es/holded-php-sdk).

README 文档

README

Laravel integration for the Holded SDK.

Installation

The preferred way to install this extension is through composer.

With Composer installed, you can then install the extension using the following commands:

$ php composer.phar require homedoctor-es/laravel-holded

or add

...
    "require": {
        "homedoctor-es/laravel-holded": "*"
    }

to the require section of your composer.json file.

Configuration

  1. Register the ServiceProvider in your config/app.php service provider list.

config/app.php

return [
    //other stuff
    'providers' => [
        //other stuff
        \HomedoctorEs\Laravel\Holded\HoldedServiceProvider::class,
    ];
];
  1. If you want, you can add the following facade to the $aliases section.

config/app.php

return [
    //other stuff
    'aliases' => [
        //other stuff
        'Holded' => \HomedoctorEs\Laravel\Holded\Facades\Holded::class,
    ];
];
  1. Publish the Holded provider
php artisan vendor:publish --provider="HomedoctorEs\Laravel\Holded\HoldedServiceProvider"
  1. Set the reference, api_key and base_url in the config/holded.php file.

config/holded.php

return [
    'api_key' => env('HOLDED_API_KEY'),
    'base_url' => env('HOLDED_BASE_URL', 'https://api.holded.com/api/'),
];
  1. Or use .env file
HOLDED_API_KEY=
HOLDED_BASE_URL=https://api.holded.com/api/

Usage

You can use the facade alias Holded to execute services of the Holded sdk. The authentication params will be automatically injected.

$contacts = \HomedoctorEs\Laravel\Holded\Facades\Holded::contact();

Or use Laravel Service Container to get The Holded Instance.

app(\HomedoctorEs\Laravel\Holded\Holded::class)->contact();

Once you have done this steps, you can use all Holded SDK endpoints as are described in the sdk package documentation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-11-18