sevenpluss/laravel-twitch-api

The Laravel wrapper for twitch helix api

1.0.0 2019-05-19 22:08 UTC

This package is auto-updated.

Last update: 2024-09-18 08:56:34 UTC


README

Latest Stable Version Total Downloads License

PHP Twitch Api Wrapper for Laravel 5+

NOTICE: This library uses the latest Twitch HELIX API which ist not fully featured yet

Table of contents

  1. Installation
  2. Configuration
  3. Documentation

Installation

composer require sevenpluss/laravel-twitch-api

Or add sevenpluss/laravel-twitch-api to your composer.json

"sevenpluss/laravel-twitch-api": "^1.0"

Run composer update to pull the latest version.

Add Service Provider to your config/app.php file: If you use Laravel 5.5+ you are already done, leave this step and go next

Sevenpluss\LaravelTwitchApi\Providers\TwitchServiceProvider::class,

Configuration

Copy configuration to config folder:

$ php artisan vendor:publish --provider="Sevenpluss\LaravelTwitchApi\Providers\TwitchServiceProvider"

Add the User model to your config/auth.php file:

//...
    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => config('twitch_api.user_model'),
        ],
//...

Add environmental variables to your .env

TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
TWITCH_REDIRECT_URI=http://localhost

Documentation

All documentation how to use Twitch Api you can obtain here