Skip to content

Instantly share code, notes, and snippets.

@erikfig
Created August 23, 2019 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikfig/97f5c6226a25c38651ace38b6f77deb6 to your computer and use it in GitHub Desktop.
Save erikfig/97f5c6226a25c38651ace38b6f77deb6 to your computer and use it in GitHub Desktop.
<?php
namespace App\Client;
class Client
{
protected $token;
protected handler()
{
$client = new Client();
$client->request(..., ..., [
'body' => ...
])
}
public function __call($nome, $attribute)
{
$nome = get-contas-a-pagar;
$this->url = '/api/' + $nome;
$this->handler();
}
public function contasAPagarFornecedores()
{
$this->url = '...';
$this->handler();
}
}
app()->bind('App\Client\Client', function ($app) {
$client = new App\Client;
$client->auth();
return $client;
});
$client = app()->make('App\Client\Client');
$client->getContasAPagar('GET', $data) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment