soomedia / laravel-floorplanner
Laravel Service Provider for the Floorplanner API
Installs: 2 470
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- ext-json: *
- illuminate/support: ^9.0
- soomedia/floorplanner-v2: ~4.0
Requires (Dev)
- orchestra/testbench: ~7.0
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.