PHP code example of xitox97 / laravel-opendota

1. Go to this page and download the library: Download xitox97/laravel-opendota 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/ */

    

xitox97 / laravel-opendota example snippets

bash
php artisan vendor:publish --provider Xitox97\LaravelOpendota\LaravelOpendotaServiceProvider --tag="config"
 php
$player = Opendota::getPlayer($player_id);
$player->json();
$player->body();
etc...
 php
$playerWinLose = Opendota::getPlayerWL(311360822,['limit' => 1000])->json();
 php
$player = Opendota::getMatch($match_id);
 php
$player = Opendota::getPlayersByRank();
 php
$player = Opendota::getProPlayers();
 php
$player = Opendota::proMatches();
 php
$player = Opendota::publicMatches();