added source and owner to mediable

This commit is contained in:
Denis Duliçi 2021-09-10 11:18:05 +03:00
parent b7c7a1f09e
commit 78eeb8cb6f

View File

@ -44,13 +44,17 @@ trait Media
foreach ($tags as $tag) {
$attach = [];
foreach ($ids as $id) {
$attach[$id] = [
'company_id' => company_id(),
'created_from' => source_name(),
'created_by' => user_id(),
'tag' => $tag,
'order' => ++$increments[$tag],
];
}
$this->media()->attach($attach);
}