New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

spikkl/spikkl-php-laravel-client

Spikkl API client wrapper for Laravel
1,072
Install
composer require spikkl/spikkl-php-laravel-client
Latest Version:v1.3.0
PHP:^7.2 | ^8.0
Laravel:6 – 9
Older releases:5
License:BSD-2-Clause
Last Updated:Oct 4, 2022
Links: GitHub  ·  Packagist
Maintainer: hgwevandenberg

Spikkl for Laravel

Spikkl-php-laravel-client incorporates the Spikkl API into your Laravel or Lumen project.

Build Status

Requirements

Installation

Add Spikkl-php-laravel-client to your composer file via the composer require command:

   $ composer require spikkl/spikkl-php-laravel-client:^1.0

Or add it to composer.json manually:

"require": {
  "spikkl/spikkl-php-laravel-client": "^1.0"
}

Spikkl-php-laravel-client's service provider will be automatically registered using Laravel's auto-discovery feature.

Note: for Lumen you have to add the Spikkl facade and service provider manually to: bootstrap/app.php:

$app->withFacades(true, [ 'Spikkl\Laravel\Facades\Spikkl' => 'Spikkl' ]);

$app->register(Spikkl\Laravel\ServiceProvider::class);

Configuration

You will only need to add the SPIKKL_API_KEY variable to your .env file.

SPIKKL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Example usage

Here you can see an example of just how simple this package is to use.

Location lookup by supported country code, postal code, street number, and street number suffix.

$results = Spikkl::api()->lookup('nld', '2611HB', '175', null);

Location reverse lookup by supported country code, longitude, and latitude.

$results = Spikkl::api()->reverse('nld', 4.354901, 52.012133);

Note: longitude and latitude values will be rounded to 9 decimal places.

Global helper method

For your convenience we have added the global spikkl() helper function. It is an easy shortcut to the Spikkl::api() facade accessor.

// Using facade accessor
$results = Spikkl::api()->lookup('nld', '2611HB', '175', null);

// Using global helper function
$results = spikkl()->lookup('nld', '2611HB', '175', null);

License

BSD (Berkeley Software Distribution) License. Copyright (c) 2020, Spikkl

Support

Contact: www.spikkl.nl — info@spikkl.nl

Related Packages

vdhicts/hihaho-api-client

A client for the API of HiHaHo

18,372 0
vdhicts/wefact-api-client

A client for the API of WeFact

4,318 4
devio/pipedrive

Complete Pipedrive API client for PHP and/or Laravel

1,926,938 172
timkley/weaviate-php

A PHP HTTP Client for the Weaviate REST API

91,153 36
iivannov/larasquare

Simple and extensible Foursquare API PHP Client with Laravel Support based on Gu...

5,067 8

Version History

Version Released PHP Laravel License
v1.3.0 ^7.2 | ^8.0 ^6.0 | ^7.0 | ^8.0 | ^9.0 BSD-2-Clause
v1.2.0 ^7.2 | ^8.0 ^6.0 | ^7.0 | ^8.0 BSD-2-Clause
v1.1.2 ^7.2 | ^8.0 ^6.0 | ^7.0 | ^8.0 BSD-2-Clause
v1.1.1 ^7.1.3 | ^7.2 ^5.8.0 | ^6.0 BSD-2-Clause
v1.1.0 ^7.1.3 | ^7.2 ^5.8.0 | ^6.0 BSD-2-Clause