1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

INA-4 | Add Purchase Order Observer

This commit is contained in:
Nikola Cirkovic 2022-05-29 05:59:44 +02:00
parent eaa0898222
commit 020cf10202
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,64 @@
<?php
namespace App\Observers;
use App\Models\PurchaseOrder;
class PurchaseOrderObserver
{
/**
* Handle the client "created" event.
*
* @param PurchaseOrder $purchase_order
* @return void
*/
public function created(PurchaseOrder $purchase_order)
{
}
/**
* Handle the client "updated" event.
*
* @param PurchaseOrder $purchase_order
* @return void
*/
public function updated(PurchaseOrder $purchase_order)
{
}
/**
* Handle the client "deleted" event.
*
* @param PurchaseOrder $purchase_order
* @return void
*/
public function deleted(PurchaseOrder $purchase_order)
{
}
/**
* Handle the client "restored" event.
*
* @param PurchaseOrder $purchase_order
* @return void
*/
public function restored(PurchaseOrder $purchase_order)
{
//
}
/**
* Handle the client "force deleted" event.
*
* @param PurchaseOrder $purchase_order
* @return void
*/
public function forceDeleted(PurchaseOrder $purchase_order)
{
//
}
}

View File

@ -215,6 +215,7 @@ use App\Models\Payment;
use App\Models\Product;
use App\Models\Project;
use App\Models\Proposal;
use App\Models\PurchaseOrder;
use App\Models\Quote;
use App\Models\Subscription;
use App\Models\Task;
@ -231,6 +232,7 @@ use App\Observers\PaymentObserver;
use App\Observers\ProductObserver;
use App\Observers\ProjectObserver;
use App\Observers\ProposalObserver;
use App\Observers\PurchaseOrderObserver;
use App\Observers\QuoteObserver;
use App\Observers\SubscriptionObserver;
use App\Observers\TaskObserver;
@ -593,5 +595,6 @@ class EventServiceProvider extends ServiceProvider
Quote::observe(QuoteObserver::class);
Task::observe(TaskObserver::class);
User::observe(UserObserver::class);
PurchaseOrder::observe(PurchaseOrderObserver::class);
}
}