Download the PHP package captaintea/laravel-sportmonks-soccer without Composer
On this page you can find all versions of the php package captaintea/laravel-sportmonks-soccer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download captaintea/laravel-sportmonks-soccer
More information about captaintea/laravel-sportmonks-soccer
Files in captaintea/laravel-sportmonks-soccer
Package laravel-sportmonks-soccer
Short Description Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama
License MIT
Informations about the package laravel-sportmonks-soccer
Laravel Sportmonks Soccer API
Laravel wrapper for Sportmonks (live) score API calls. Documentation for the API can be found here
Installation
1- Require the package via Composer in your composer.json
.
2- Run Composer to install or update the new requirement.
or
3- Add the service provider to your app/config/app.php
file
4- Add the facade to your app/config/app.php
file
5- Publish the configuration file
6- Review the configuration file and add your token (preferably through env: 'api_token' => env('API_TOKEN')
)
7- Review the configuration file and add your timezone (preferably through config file: 'timezone' => config('app.timezone')
)
Usage
Refer to the official docs as to which calls can be made and check the calls in traits under Sportmonks\SoccerAPI\Requests.
For example, get all leagues (if using facade):
The above returns an object containing a data
array.
If you want to directly retrieve the data within data
, change your config file: 'without_data' => true
Get a match by its id:
If you need to include other relations (check the official docs for which relations can be included):
All versions of laravel-sportmonks-soccer with dependencies
illuminate/support Version v8.12.3
guzzlehttp/guzzle Version ^7.0.1
ext-json Version *