3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-04-06 07:47:47 +00:00
Files
snipe-it/app/Models/Traits/Acceptable.php
2026-03-13 15:55:28 +00:00

33 lines
810 B
PHP

<?php
namespace App\Models\Traits;
use App\Models\User;
use Illuminate\Support\Facades\Log;
/**
* 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 string $signature
*/
public function acceptedCheckout(User $acceptedBy, $signature, $filename = null)
{
Log::debug('acceptedCheckout in Acceptable trait fired, tho it doesn\'t do anything?');
}
/**
* Run after the checkout acceptance was declined by the user
*
* @param User $acceptedBy
* @param string $signature
*/
public function declinedCheckout(User $declinedBy, $signature) {}
}