50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Observers;
|
|
|
|
use App\Events\InvoiceItem as InvoiceItemEvent;
|
|
use App\Models\InvoiceItem;
|
|
|
|
class InvoiceItemObserver
|
|
{
|
|
/**
|
|
* Handle the InvoiceItem "creating" event.
|
|
*/
|
|
public function creating(InvoiceItem $invoice): void
|
|
{
|
|
event(new InvoiceItemEvent\Creating($invoice));
|
|
}
|
|
|
|
/**
|
|
* Handle the InvoiceItem "created" event.
|
|
*/
|
|
public function created(InvoiceItem $invoice): void
|
|
{
|
|
event(new InvoiceItemEvent\Created($invoice));
|
|
}
|
|
|
|
/**
|
|
* Handle the InvoiceItem "updating" event.
|
|
*/
|
|
public function updating(InvoiceItem $invoice): void
|
|
{
|
|
event(new InvoiceItemEvent\Updating($invoice));
|
|
}
|
|
|
|
/**
|
|
* Handle the InvoiceItem "updated" event.
|
|
*/
|
|
public function updated(InvoiceItem $invoice): void
|
|
{
|
|
event(new InvoiceItemEvent\Updated($invoice));
|
|
}
|
|
|
|
/**
|
|
* Handle the InvoiceItem "deleted" event.
|
|
*/
|
|
public function deleted(InvoiceItem $invoice): void
|
|
{
|
|
event(new InvoiceItemEvent\Deleted($invoice));
|
|
}
|
|
}
|