, (*1)
TrustSpot API client wrapper for Laravel
Laravel-TrustSpot incorporates the TrustSpot API into your Laravel or Lumen project., (*2)
Installation
Add Laravel-TrustSpot to your composer file via the composer require
command:, (*3)
$ composer require gonzaloner/laravel-trustspot
Laravel 5.5+ will use the auto-discovery function., (*4)
In Laravel 5.4 (or if you are not using auto-discovery) register the service provider by adding it to the providers
key in config/app.php
. Also register the facade by adding it to the aliases
key in config/app.php
., (*5)
'providers' => [
...
Gonzaloner\LaravelTrustSpot\LaravelTrustSpotServiceProvider::class,
],
'aliases' => [
...
'LaravelTrustSpot' => Gonzaloner\LaravelTrustSpot\Facades\LaravelTrustSpot::class,
]
In order to add your API keys you have to execute:, (*6)
$ php artisan vendor:publish --provider="Gonzaloner\LaravelTrustSpot\LaravelTrustSpotServiceProvider"
After that, config/laraveltrustspot.php
will be created. Inside this file you will find all the fields that can be edited in this package., (*7)
Usage
At the moment, only the Company Review Get API is supported., (*8)
Get company reviews
Should be called in a view like this:, (*9)
{{ LaravelTrustSpot::company->get(optional int $limit, optional int $offset, optional string $sort) }}
License
MIT License
Copyright (c) 2017, (*10)