Fix notification error when creating sample data

This commit is contained in:
Burak Çakırel
2021-01-13 22:25:39 +03:00
parent c50c8acd75
commit eaf79b3a4b
3 changed files with 8 additions and 2 deletions

View File

@ -11,10 +11,14 @@ class SendDocumentPaymentNotification
* Handle the event.
*
* @param $event
* @return array
* @return void
*/
public function handle(Event $event)
{
if ($event->request['type'] !== 'income') {
return;
}
$document = $event->document;
$transaction = $document->transactions()->latest()->first();