PHPackages                             jcergolj/http-client-generator-for-laravel - 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. jcergolj/http-client-generator-for-laravel

ActiveLibrary

jcergolj/http-client-generator-for-laravel
==========================================

command for generating http client request attributes, requests and responses

v0.5(1y ago)0482↓100%2MITPHP

Since Oct 16Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/jcergolj/http-client-generator-for-laravel)[ Packagist](https://packagist.org/packages/jcergolj/http-client-generator-for-laravel)[ RSS](/packages/jcergolj-http-client-generator-for-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Http Client Generator for Laravel
=================================

[](#http-client-generator-for-laravel)

This package generates classes for Laravel Http client.

#### Installation

[](#installation)

```
composer require jcergolj/http-client-generator-for-laravel --dev
```

### Example of usage

[](#example-of-usage)

```
$attributes = new FetchAttributes('id', 'name');
$request = app(FetchRequest);
$response = $request->send($attributes);

if ($response->bad()) {
    throw new RequestFailed($response->response->body());
}

$userId = $response->id;
```

Available commands
------------------

[](#available-commands)

### Creates Attributes Class

[](#creates-attributes-class)

```
php artisan http-client-generator:attribute {client?} {name?}
```

Output

```
