Newsletter Subscription Event

samarium · app/Events/NewsletterSubscriptionCreated.php · php · MIT
unclassified, integration, email, tag:newsletter-event, tag:laravel-events, tag:subscription-model

Simple event for newsletter subscriptions using Laravel's Dispatchable, InteractsWithSockets, and SerializesModels traits, exposing the subscription model.

// Source: https://github.com/shyamsitaula/samarium | License: MIT | Copyright 2024 oitcode
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use App\Models\NewsletterSubscription\NewsletterSubscription;

class NewsletterSubscriptionCreated
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public NewsletterSubscription $newsletterSubscription;

    /**
     * Create a new event instance.
     */
    public function 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key