Laravel Service Provider for the Floorplanner API.
The Floorplanner service provider requires Laravel version 9
and above and PHP version 8.1
and above.
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.
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/
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.