larva/larva-client

This is a Larva client.

1.0.6 2019-05-15 10:05 UTC

This package is auto-updated.

Last update: 2022-01-05 08:08:12 UTC


README

This is a Laravel Api adapter.

Installation

composer require larva/larva-client

for Laravel

This service provider must be registered.

// config/app.php

'providers' => [
    '...',
    Larva\Client\LarvaServiceProvider::class,
];

edit the config file: config/larva.php

add config

<?php
return [
    'endpoint' => '',
    'client_id' => env('LARVA_CLIENT_ID', 'your-larva-client-id'),
    'client_secret' => env('LARVA_CLIENT_SECRET', 'your-larva-client-secret'),
    'scope' => '',
    'timeout' => 5.0,
    'httpOptions' => [
        'http_errors' => false,
    ],
];

Use

use Larva\Client\Larva;

$response = Larva::get('api/oatuh/test');
print_r($response);