Laravel website that uses Sportmonks (live)score API calls. Documentation for the API can be found here
1- Require the laravel-sportmonks-soccer-package via Composer.
$ composer require kirill-latish/laravel-sportmonks-soccer
2- Run Composer to install or update the new requirement.
$ composer install
or
$ composer update
3- Publish the configuration file
$ php artisan vendor:publish --provider="Sportmonks\SoccerAPI\SoccerAPIServiceProvider"
4- Review the configuration file and add your token (preferably through env: 'api_token' => env('API_TOKEN')
)
If you don't have a API-token, you can get a free one here This should be enough to experiment with the code.
config/soccerapi.php
5- Review the configuration file and change the 'without_data' => 'false' to
true`:
config/soccerapi.php
6- Review the configuration file and add your timezone (preferably through config file: 'timezone' => config('app.timezone')
)
config/soccerapi.php
7-- Copy the file SoccerAPIClient.php from soccerapi-source
to vendor/kirill-latish/laravel-sportmonks-soccer/src-Sportmonks/SoccerAPI
and overwrite the existing SoccerAPIClient.php