phpvms/app/Listeners/ExpenseListener.php
2018-03-01 16:20:13 -06:00

26 lines
469 B
PHP

<?php
namespace App\Listeners;
use App\Events\Expenses;
use App\Models\Enums\ExpenseType;
use App\Models\Expense;
class ExpenseListener
{
/**
* Return a list of additional expenses
* @param Expenses $event
* @return array
*/
public function handle(Expenses $event)
{
return [
new Expense([
'type' => ExpenseType::FLIGHT,
'amount' => 15000 # $150
]),
];
}
}