wallstreetio / laravel-ontraport by wallstreetio

A Laravel package to easily integrate the Ontraport API.
221
2
2
Package Data
Maintainer Username: wallstreetio
Maintainer Contact: tashkar18@gmail.com (Tamer Ashkar)
Package Create Date: 2017-03-06
Package Last Update: 2021-06-29
Language: PHP
License: MIT
Last Refreshed: 2024-11-15 15:17:13
Package Statistics
Total Downloads: 221
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 1
Total Open Issues: 3

Laravel Ontraport API

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).