PHP code example of kfoobar / laravel-sportmonks-soccer

1. Go to this page and download the library: Download kfoobar/laravel-sportmonks-soccer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kfoobar / laravel-sportmonks-soccer example snippets


use SoccerAPI;

...

$response = SoccerAPI::leagues()->all();
$response = SoccerAPI::fixtures()->byId($id);

$response = SoccerAPI::seasons()->setInclude(['league', 'fixtures'])->all();

$response = SoccerAPI::fixtures()->byId($id);

var_dump($response->data);

$response = SoccerAPI::fixtures()->byId($id);

var_dump($response);
bash
$ php artisan vendor:publish --provider="Sportmonks\SoccerAPI\SoccerAPIServiceProvider"