Downloads
Stars
Version
ZingFit is a platform for Boutique Fitness Clubs with a RESTful API available to premium clients. This package will greatly assist a ZingFit client's Developer with Integration when used with Laravel 6 or 7!
This is a 3rd Party Package not Supported by ZingFit.
- [Installation](#installation)
Note: Cape & Bay recomends PHP 7.3+ and Laravel/Eloquent 7.x
Install this package with composer:
$ composer require capeandbay/zingfit
The package will automatically register itself.
Now, to run this package's migrations, first publish the migrations into your app's migrations
directory, by running the following command:
```
php artisan vendor:publish --tag="zingfit.migrations"
```
Finally, run the migrations:
```
php artisan migrate
```
You can optionally publish the config file with:
php artisan vendor:publish --provider="CapeAndBay\ZingFit\ZingFitServiceProvider" --tag="config"
This is the contents of the published config file:
return [
'production_url' => 'https://api.zingfit.com',
'sandbox_url' => 'https://api.zingfitlab.com',
'client_id' => env('ZINGFIT_CLIENT_ID', '__CLIENT_ID__'),
'client_secret' => env('ZINGFIT_CLIENT_SECRET', '__SECRET__'),
'client_tenant_id' => env('ZINGFIT_TENANT_ID', '__TENANT__')
];
Note, you will need to add the env variables above to .env file.
Use via dependency injection
use CapeAndBay\ZingFit\ZingFit;
public function __construct(ZingFit $zingfit)
{
/* ... code logic here ...*/
}
On initialization, the ZingFit object will attempt to retrieve the latest non-expired access token. Otherwise it will attempt to ping ZingFit using the ENV variables referenced in the zingfit config.
Here's a demo of how you can use it: You can retrieve all of the Product Series for a Region's Club with the following:
$zingFit->getAllSeriesForSite($region_id, $site_id)
7.20.2020 - First Draft.
None Available.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
license. Please see the license file for more information.