mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 15:44:11 -08:00
934afa036f
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
34 lines
702 B
PHP
34 lines
702 B
PHP
<?php
|
|
|
|
namespace App\Models\Traits;
|
|
|
|
use App\Models\User;
|
|
|
|
/**
|
|
* 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)
|
|
{
|
|
}
|
|
}
|