mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 23:19:42 -08:00
32 lines
779 B
PHP
32 lines
779 B
PHP
<?php
|
|
|
|
namespace App\Models\Traits;
|
|
|
|
use App\Models\Asset;
|
|
use App\Models\CustomField;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
/**
|
|
* This trait allows models to have a callback after their checkout gets accepted or declined.
|
|
*
|
|
* @author Till Deeke <kontakt@tilldeeke.de>
|
|
*/
|
|
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) {}
|
|
}
|