phpvms/app/Models/Observers/JournalObserver.php
2018-08-26 16:40:04 +00:00

23 lines
356 B
PHP

<?php
namespace App\Models\Observers;
use App\Models\Journal;
/**
* Class JournalObserver
*/
class JournalObserver
{
/**
* @param Journal $journal
*
* @throws \UnexpectedValueException
* @throws \InvalidArgumentException
*/
public function creating(Journal $journal): void
{
$journal->balance = 0;
}
}