mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
58 lines
1011 B
PHP
58 lines
1011 B
PHP
<?php
|
|
|
|
namespace App\Observers;
|
|
|
|
use App\Models\Meetup;
|
|
use App\Traits\NostrTrait;
|
|
use Exception;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class MeetupObserver
|
|
{
|
|
use NostrTrait;
|
|
|
|
/**
|
|
* Handle the Meetup "created" event.
|
|
*/
|
|
public function created(Meetup $meetup): void
|
|
{
|
|
try {
|
|
$this->publishOnNostr($meetup, $this->getText('Meetup'));
|
|
} catch (Exception $e) {
|
|
Log::error($e->getMessage());
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Handle the Meetup "updated" event.
|
|
*/
|
|
public function updated(Meetup $meetup): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the Meetup "deleted" event.
|
|
*/
|
|
public function deleted(Meetup $meetup): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the Meetup "restored" event.
|
|
*/
|
|
public function restored(Meetup $meetup): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the Meetup "force deleted" event.
|
|
*/
|
|
public function forceDeleted(Meetup $meetup): void
|
|
{
|
|
//
|
|
}
|
|
}
|