PHP code example of andskur / coinmc

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

    

andskur / coinmc example snippets


'providers' => [
    // Other service providers...

    Andskur\CoinMc\CoinMcServiceProvider::class,
],

'CoinMc' => Andskur\CoinMc\CoinMcFacade::class,



namespace App\Http\Controllers;

use CoinMc;

class SomeController extends Controller
{
    public function index(CoinMc $coinmc)
    {

        // Get CoinMarketCap tickers sorting by 24h volume
		$coinmc->getTicker();

		// Get ticker for specific coin
		$coin = 'bitcoin';
		$coinmc->tickerCoin($coin);

		// Get global data
		$coinmc->globalData();
    }
}