proxymakers / proxymakers-php
PHP Library for ProxyMakers API (with laravel support)
Requires
- php: ^7.2
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-10-17 17:40:36 UTC
README
proyxmakers-php
ProxyMakers PHP Library (with laravel support)
please read our documentation for usage.
Installation
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.
Laravel 5.5 and up
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.
Laravel 5.4 or 5.3
Add the following Service Provider to your config/app.php providers array:
ProxyMakers\API\ProxyMakersServiceProvider::class,
Publish Laravel Configuratino Files (All Versions)
php artisan vendor:publish --provider="ProxyMakers\API\ProxyMakersServiceProvider"
Environment Variables
PROXYMAKERS_TOKEN=<insert_your_token_here>
Standalone Usage
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());
Laravel Usage
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());
Dependencies
The library uses Guzzle as its HTTP communication layer.
License
The MIT License (MIT). Please see License File for more information.