PHPackages                             softok2/api-client-wrapper - 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. softok2/api-client-wrapper

ActiveLibrary[API Development](/categories/api)

softok2/api-client-wrapper
==========================

A basic wrapper for consuming API

1.0.3(2y ago)11091MITPHPPHP ^8.1

Since Oct 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/softok2/api-rest-wrapper)[ Packagist](https://packagist.org/packages/softok2/api-client-wrapper)[ RSS](/packages/softok2-api-client-wrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

[![Logo](https://avatars.githubusercontent.com/u/20829145?v=4)](https://avatars.githubusercontent.com/u/20829145?v=4)

Softok2 / API Client Wrapper
============================

[](#softok2--api-client-wrapper)

It's a small wrapper to easily and quickly consume external APIs in Laravel

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

[](#installation)

Install API Client Wrapper in your laravel app using

```
composer require softok2/api-client-wrapper
```

Publish configuration file
--------------------------

[](#publish-configuration-file)

Publishing the config file is optional:

```
php artisan vendor:publish --provider="Softok2\RestApiClient\Providers\ServiceProvider" --tag="config"
```

Environment Variables
---------------------

[](#environment-variables)

To run this project, you will need to add the following environment variables to your .env file

`REST_API_URL`

`REST_API_TIMEOUT`

Generate API Resurces
---------------------

[](#generate-api-resurces)

```
php artisan make:apic Auth
```

This command would be generate a resource classs under App\\Services\\API directory. This class look like this:

```
