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