Handle side effects of accepting/declining

When declining an asset, it gets checked in.
This commit is contained in:
Till Deeke
2018-07-28 13:09:21 +02:00
parent 8648d53d25
commit 1bdf71b584
8 changed files with 69 additions and 64 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Models\Traits;
use App\Models\Asset;
use App\Models\CustomField;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
trait Acceptable {
/**
* Run after the checkout acceptance was accepted by the user
*
* @param User $acceptedBy
* @param string $signature
*/
public function acceptedCheckout(User $acceptedBy, $signature) {}
/**
* Run after the checkout acceptance was declined by the user
*
* @param User $acceptedBy
* @param string $signature
*/
public function declinedCheckout(User $declinedBy, $signature) {}
}