PHP code example of kallencode / laravel-twitch

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

    

kallencode / laravel-twitch example snippets


// config/app.php
'providers' => [
    ...
    Kallencode\Twitch\TwitchServiceProvider::class,
    ...
];

// config/app.php
'aliases' => [
    ...
    'Twitch' => Kallencode\Twitch\TwitchFacade::class,
    ...
];

php artisan vendor:publish --provider="Kallencode\Twitch\TwitchServiceProvider"

return [

    'clientId' => env('TWITCH_CLIENT_ID'),

    'baseUrl' => env('TWITCH_BASE_URL','https://api.twitch.tv/kraken/')

];
 php
$channel = Twitch::getChannelById(44322889);