PHPackages                             kielabokkie/laravel-guzzle-api-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kielabokkie/laravel-guzzle-api-service

Abandoned → [kielabokkie/laravel-apise](/?search=kielabokkie%2Flaravel-apise)Library[API Development](/categories/api)

kielabokkie/laravel-guzzle-api-service
======================================

A base class for interacting with external APIs via Guzzle

v0.3.2(6y ago)11.6kMITPHPCI failing

Since Oct 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kielabokkie/laravel-guzzle-api-service)[ Packagist](https://packagist.org/packages/kielabokkie/laravel-guzzle-api-service)[ RSS](/packages/kielabokkie-laravel-guzzle-api-service/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

Laravel Guzzle API Service
==========================

[](#laravel-guzzle-api-service)

**Note: This package is still being developed and is not production ready. Use at your own risk!**

Installation
------------

[](#installation)

Install the package via composer:

```
composer require kielabokkie/laravel-guzzle-api-service

```

Package configuration
---------------------

[](#package-configuration)

Publish the config file by running the following command:

```
php artisan vendor:publish --provider="Kielabokkie\GuzzleApiService\GuzzleApiServiceProvider"
```

This is the contents of the file that will be published at `config/api-service.php`:

```
return [
    /*
     * Enable logging of request and responses to storage/logs/api-service.log
     */
    'logging_enabled' => env('API_SERVICE_LOGGING_ENABLED', false),

    /*
     * The namespace where your API Service classes are created under.
     * This will be appended to your base namespace. So the config below
     * will create a class under App\Support\Services.
     */
    'namespace' => 'Support\Services'
];
```

Setup
-----

[](#setup)

To make use of the base API Client class you'll need to add the required `$baseUrl` to set the base URL of your API. You'll also have to call the `$this->setClient();` function in the constructor of your service class.

```
