soomedia/laravel-floorplanner

Laravel Service Provider for the Floorplanner API

v5.0.0 2022-06-20 12:31 UTC

This package is auto-updated.

Last update: 2024-12-20 18:10:27 UTC


README

Laravel Service Provider for the Floorplanner API.

Requirements

The Floorplanner service provider requires Laravel version 9 and above and PHP version 8.1 and above.

Installation

Use Composer to install this package:

composer require soomedia/laravel-floorplanner

The package will be automatically discovered by your Laravel installation, so you don't need to add the service provider and facade to your app config file.

Configuration

First you have to publish the config file:

php artisan vendor:publish --provider="SooMedia\LaravelFloorplanner\FloorplannerServiceProvider"

Now you can find the config file in config/floorplanner.php. Here you can configure the HTTP client's options. The API key is best to be configured using environment variables:

FLOORPLANNER_API_KEY=my_api_key

You can also change the Floorplanner base URI and API endpoint used by the client:

FLOORPLANNER_BASE_URI=https://sandbox.floorplanner.com/
FLOORPLANNER_API_ENDPOINT=api/v2/

Usage

You can use the Floorplanner facade to get an API endpoint:

$user = \Floorplanner::users()->show(6);

For more information about the available endpoints and how to use them, check out soomedia/floorplanner-v2.