ProxyMakers PHP Library (with laravel support)
please read our documentation for usage.
The recommended way to install this library is through Composer:
$ composer require proxymakers/proxymakers-php
If you're not familiar with composer
follow the installation instructions for
Linux/Unix/Mac or
Windows, and then read the
basic usage introduction.
You don't have to do anything else, this package uses the Package Auto-Discovery feature, and should be available as soon as you install it via Composer.
Add the following Service Provider to your config/app.php providers array:
ProxyMakers\API\ProxyMakersServiceProvider::class,
php artisan vendor:publish --provider="ProxyMakers\API\ProxyMakersServiceProvider"
PROXYMAKERS_TOKEN=<insert_your_token_here>
after installing with composer you can simply initiate a new instance of ProxyMakers class:
$pm = new ProxyMakers\API\ProxyMakers($token);
// use the method you want, ex:
var_dump($pm->checkCredit()->getData());
you can use dependency injection feature in any method of your controller or resolve it through laravel service container:
using dependency injection:
Route::get('/', function (\ProxyMakers\API\ProxyMakers $pm) {
dd($pm->checkCredit()->getData());
});
using service container:
$pm = resolve('ProxyMakers\\API\\ProxyMakers');
dd($pm->checkCredit()->getData());
The library uses Guzzle as its HTTP communication layer.
The MIT License (MIT). Please see License File for more information.