Files
einundzwanzig-portal/app/Observers/OrangePillObserver.php
HolgerHatGarKeineNode d6d6560409 nostr events schedule
2023-02-24 13:51:17 +01:00

58 lines
1.1 KiB
PHP

<?php
namespace App\Observers;
use App\Models\OrangePill;
use App\Traits\NostrTrait;
use Exception;
use Illuminate\Support\Facades\Log;
class OrangePillObserver
{
use NostrTrait;
/**
* Handle the OrangePill "created" event.
*/
public function created(OrangePill $orangePill): void
{
try {
$this->publishOnNostr($orangePill, $this->getText($orangePill));
} catch (Exception $e) {
Log::error($e->getMessage());
}
}
/**
* Handle the OrangePill "updated" event.
*/
public function updated(OrangePill $orangePill): void
{
//
}
/**
* Handle the OrangePill "deleted" event.
*/
public function deleted(OrangePill $orangePill): void
{
//
}
/**
* Handle the OrangePill "restored" event.
*/
public function restored(OrangePill $orangePill): void
{
//
}
/**
* Handle the OrangePill "force deleted" event.
*/
public function forceDeleted(OrangePill $orangePill): void
{
//
}
}