mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-02 12:16:06 -04:00
23 lines
644 B
PHP
23 lines
644 B
PHP
<?php
|
|
|
|
namespace Modules\Account\Traits;
|
|
|
|
trait Transaction
|
|
{
|
|
public function makeTransaction($title,$type,$method,$come_from,$description,$class,$amount,$date,$creator)
|
|
{
|
|
\Modules\Account\Entities\Transaction::create([
|
|
'title' => $title,
|
|
'type' => $type,
|
|
'payment_method' => $method,
|
|
'come_from' => $come_from,
|
|
'description' => $description,
|
|
'morphable_id' => $class->id,
|
|
'morphable_type' => get_class($class),
|
|
'amount' => $amount,
|
|
'transaction_date' => $date,
|
|
'created_by' => $creator,
|
|
]);
|
|
}
|
|
}
|