PHPackages                             gunharth/laravel-lightspeed-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gunharth/laravel-lightspeed-api

ActiveLibrary[API Development](/categories/api)

gunharth/laravel-lightspeed-api
===============================

A Laravel wrapper for the Lightspeed Seoshop API

1.0.4(9y ago)417.0k3MITPHPPHP ^7.0

Since Nov 29Pushed 9y ago3 watchersCompare

[ Source](https://github.com/gunharth/laravel-lightspeed-api)[ Packagist](https://packagist.org/packages/gunharth/laravel-lightspeed-api)[ Docs](https://github.com/gunharth/laravel-lightspeed-api)[ RSS](/packages/gunharth-laravel-lightspeed-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

Laravel 5 Lightspeed Seoshop API Wrapper
========================================

[](#laravel-5-lightspeed-seoshop-api-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/74bf44b5324ca55ab5d01debc76f92b469138d44cb7e3ddb7552f94f1a8bad33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67756e68617274682f6c61726176656c2d6c6967687473706565642d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gunharth/laravel-lightspeed-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/85567fa7e5d71d235604716e48e907fdd4dc4a1ad1bbe0663ca1baa37cbe9aee/68747470733a2f2f7374796c6563692e696f2f7265706f732f35383330353930332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/75090664)

This package makes working with the Lightspeed eCom API a breeze. Once installed you can perform all API calls like so:

```
use ShopApi;

// shop info
$shopInfo = ShopApi::shop()->get();

// retrieve all products
$products = ShopApi::products()->get(); // Note: by default the API spits out 50 items with a max of 250

// with params
$products = ShopApi::products()->get(null, array('page' => 1, 'limit' => 100));

// product info with id
$productInfo = ShopApi::products()->get(1);

// to change the API language
ShopApi::setApiLanguage('de');
```

Consult the [Lightspeed eCom API docs](http://developers.lightspeedhq.com/ecom/introduction/introduction/) for all of the API options.

Installation
------------

[](#installation)

Install the package via composer:

```
composer require gunharth/laravel-lightspeed-api
```

Next up the service provider must be registered:

```
'providers' => [
    ...
    Gunharth\Lightspeed\LightspeedServiceProvider::class,
];
```

Register the `Gunharth\Lightspeed\LightspeedFacade` Facade:

```
'aliases' => [
	...
    'ShopApi' => Gunharth\Lightspeed\LightspeedFacade::class,
    ...
]
```

Publish the configuration with this command:

```
php artisan vendor:publish --provider="Gunharth\Lightspeed\LightspeedServiceProvider"
```

This will publish file called `lightspeed-api.php` in your config-directory with this contents:

```
