Download the PHP package katzen48/laravel-twitch-eventsub without Composer

On this page you can find all versions of the php package katzen48/laravel-twitch-eventsub. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-twitch-eventsub

Laravel Twitch EventSub Library

Total Downloads Latest Stable Version License

Introduction

This package provides support for subscribing to Twitch EventSub. It's based on laravel-twitch and fully compatible.

Features

Installation

First, install laravel-twitch.
Please refer to their documentation.

After laravel-twitch is installed and configured, install laravel-twitch-eventsub from composer

The config can be published with

Configuration

After you published the config, you can find it in config/twitch-eventsub.php and it looks like this:

Consume EventSub events

Even when you don't subscribe to eventsub using this library, a route is registered, which defaults to {APP_URL}/twitch/eventsub/webhook. When you subscribe to EventSub and use this URL as a callback, received events are parsed into dedicated events classes, which event listeners can subscribed to, individually.

To subscribe to an event, first create a listener with php artisan make:listener <Name> and add the event it should subscribe to as a parameter to the handle() function.

To bind the listener to an event, add the listener to the $listen array in your EventServiceProvider

There you go. Your listener now gets incoming events of type channel.subscribe from the Twitch EventSub.

Subscribe to Twitch EventSub on model save

Sometimes it is necessary, that newly created instances of a model trigger a subscription to the Twitch EventSub e.g. a User logged in for the first time. This behavior can be automated with the static SubscribesEventSubs trait.

Add the trait SubscribesEventSubs to your model. Next add a static variable called $eventSubs to your model with the events to subscribe to and the conditions, mapped to the attributes of your model.

Now, whenever the created event is fired on that model, a subscription to the channel.update event tyoe is made. The id property of the model is automatically inserted for broadcaster_user_id.


All versions of laravel-twitch-eventsub with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
romanzipp/laravel-twitch Version ^4.0.10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package katzen48/laravel-twitch-eventsub contains the following files

Loading the files please wait ....