jlorente/laravel-stethome

Laravel ^5.6 integration for the Jlorente StethoMe package.

2.0.3 2021-06-25 10:23 UTC

This package is auto-updated.

Last update: 2024-11-25 17:32:21 UTC


README

Laravel integration for the StethoMe 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 jlorente/laravel-stethome

or add

...
    "require": {
        "jlorente/laravel-stethome": "*"
    }

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
        \Jlorente\Laravel\StethoMe\StethoMeServiceProvider::class,
    ];
];
  1. Add the following facade to the $aliases section.

config/app.php

return [
    //other stuff
    'aliases' => [
        //other stuff
        'StethoMe' => \Jlorente\Laravel\StethoMe\Facades\StethoMe::class,
    ];
];
  1. Set the vendor_token in the config/stethome.php file or use the predefined env variables.

config/stethome.php

return [
    'vendor_token' => 'YOUR_VENDOR_TOKEN',
    //other configuration
];

or .env

//other configurations
STETHOME_VENDOR_TOKEN=<YOUR_VENDOR_TOKEN>

Usage

You can use the facade alias StethoMe to execute api calls. The authentication params will be automaticaly injected.

StethoMe::pulmonary()->getVisitId();

See the StethoMe PHP SDK or the StethoMe API to know more about the methods and the API endpoints params and responses.

License

Copyright © 2020 José Lorente Martín jose.lorente.martin@gmail.com.

Licensed under the BSD 3-Clause License. See LICENSE.txt for details.