wallstreetio / laravel-ontraport
A Laravel package to easily integrate the Ontraport API.
v1.0.3
2019-12-01 00:41 UTC
Requires
- illuminate/support: ^5.1
- wallstreetio/ontraport: ^1.0
Requires (Dev)
- graham-campbell/testbench: ^3.3
- phpunit/phpunit: ^4.8
This package is auto-updated.
Last update: 2024-10-29 05:10:30 UTC
README
Laravel Ontraport API is simply a Laravel bridge for the Ontraport API.
Installation
composer require wallstreetio/laravel-ontraport
Configuration
Add \Wsio\Ontraport\OntraportServiceProvider
to your providers list in config/app.php
file.
'providers' => [ Wsio\Ontraport\OntraportServiceProvider::class, ]
Optionally, you may also add the Ontraport facade to your aliases list.
'aliases' => [ 'OAP' => Wsio\Ontraport\Facade\Ontraport::class, ]
Publish the configuration file.
php artisan vendor:publish --provider="Wsio\Ontraport\OntraportServiceProvider"
Add your Ontraport ONTRAPORT_APP_ID
and ONTRAPORT_API_KEY
to your .env
file.
ONTRAPORT_APP_ID="your-ontraport-app-id" ONTRAPORT_API_KEY="your-ontraport-api-key"
Usage
public function index(\Wsio\Ontraport\Ontraport $ontraport) { return $ontraport->contacts->get(); }
Or using the facade
public function show($id) { return OAP::contacts()->find($id); }
For full documentation, please refer to the Ontraport API package.
License
WallStreet.io Laravel Ontraport API is open-sourced software licensed under The MIT License (MIT).