fashionphile/laravel-kafka

Service Provider wrapper for laravel-kafka package for use in Fashionphile Laravel projects.

v1.0.1 2022-04-21 11:39 UTC

This package is auto-updated.

Last update: 2024-11-21 17:16:49 UTC


README

A Fashionphile-specific package that utilized laravel-kafka package under the hood to produce Kafka events.

Installation

Note - the composer require command will work only when package is added to Packagist.

  • composer require fashionphile/laravel-kafka
  • php artisan vendor:publish --tag=fashionphile-kafka-config

Usage

Make sure you configure your Kafka broker inside your .env.

$userCreatedObject = (new UserCreatedObject())
    ->setUuid($uuid)
    ->setFirstName($firstName)
    ->setLastName($lastName)
    ->setEmail($email)
    ->setPhone($phone)
    ->setCreatedTimestamp($timestamp);

FashionphileKafka::sendUserCreatedEvent($usetCreatedObject);