2017 © Pedro Peláez
 

library laravel-erply

Laravel connector for Erply.com

image

mochaka/laravel-erply

Laravel connector for Erply.com

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel-Erply

Latest Stable Version Total Downloads Latest Unstable Version License Build Status, (*1)

Laravel-Erply is a simple package to interface with Erply.com's API. Read http://erply.com/api for documentation on the valid api calls and parameters., (*2)

Requirements

  1. PHP 5.4+
  2. Laravel 4
  3. Guzzle 3

Installation

Add the following to your composer.json and run composer upgrade:, (*3)

"mochaka/laravel-erply": "*"

Add this line of code to the providers array located in your app/config/app.php file:, (*4)

'Mochaka\Erply\ErplyServiceProvider',

You don't need to add anything to your aliases array since the package does it for you., (*5)

You then need to publish the config file and fill it out with your erply credentials., (*6)

php artisan config:publish mochaka/laravel-erply

Usage

Usage is simple, you just use the API calls from the erply website as the function and enter the parameters as the array., (*7)

Example

As shown in the PHP examples of the API Here, the laravel-erply package makes it even simpler., (*8)

$clientGroups = Erply::getClientGroups();

This call will give us the following result. A "responseStatus" tells whether the call succeeded or failed and "recordsTotal" tells how many records were returned., (*9)

    Array
    (
        [status] => Array
            (
                [request] => getCustomerGroups
                [requestUnixTime] => 1370507041
                [responseStatus] => ok
                [errorCode] => 0
                [generationTime] => 0.0026431083679199
                [recordsTotal] => 3
                [recordsInResponse] => 3
            )

        [records] => Array
            (
                [0] => Array
                    (
                        [clientGroupID] => 17
                        [customerGroupID] => 17
                        [parentID] => 0
                        [name] => Loyal Customers
                        [pricelistID] => 0
                        [added] => 1283248838
                        [lastModified] => 1306833659
                    )

                [1] => Array
                    (
                        [clientGroupID] => 18
                        [customerGroupID] => 18
                        [parentID] => 0
                        [name] => One-time Customers
                        [pricelistID] => 0
                        [added] => 1283248848
                        [lastModified] => 1306833655
                    )

                [2] => Array
                    (
                        [clientGroupID] => 20
                        [customerGroupID] => 20
                        [parentID] => 0
                        [name] => Campaign sign-ups
                        [pricelistID] => 0
                        [added] => 1283248917
                        [lastModified] => 1306833695
                    )

            )

    )

The data would be accessed as a normal array:, (*10)

php print $clientGroups['records'][0]['clientGroupID']; // 17, (*11)

The Versions

05/08 2014

dev-master

9999999-dev

Laravel connector for Erply.com

  Sources   Download

MIT

The Requires

 

laravel guzzle erply

09/04 2014

v1.0.2

1.0.2.0

Laravel connector for Erply.com

  Sources   Download

MIT

The Requires

 

laravel guzzle erply

09/04 2014

1.0.1

1.0.1.0

Laravel connector for Erply.com

  Sources   Download

MIT

The Requires

 

laravel guzzle erply

07/04 2014

1.0.0.x-dev

1.0.0.9999999-dev

Laravel connector for Erply.com

  Sources   Download

MIT

The Requires

 

laravel guzzle erply

07/04 2014

v1.0

1.0.0.0

Laravel connector for Erply.com

  Sources   Download

MIT

The Requires

 

laravel guzzle erply