homedoctor-es/laravel-holded

Laravel integration of the [Holded PHP SDK](https://github.com/homedoctor-es/holded-php-sdk).
3,323
Install
composer require homedoctor-es/laravel-holded
Latest Version:1.0.3
PHP:>=7.0.0
License:BSD-3-Clause
Last Updated:Jan 14, 2022
Links: GitHub  ·  Packagist
Maintainer: Homedoctor

Holded SDK integration for Laravel

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.

Related Packages

homedoctor-es/laravel-intercom

Laravel integration of the [Intercom PHP SDK](https://github.com/intercom/interc...

3,318 0
php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the...

53,312 160
oriceon/oauth-5-laravel

OAuth Service Provider for Laravel 5

1,669,304 173
artdarek/oauth-4-laravel

OAuth Service Provider for Laravel 4

522,424 677
oriceon/toastr-5-laravel

Easy toastr notifications for Laravel 5

502,600 79