Added owners to entity creation and updated tests

This commit is contained in:
Dan Brown
2020-12-30 22:18:28 +00:00
parent b493becadf
commit 4c580d1571
6 changed files with 29 additions and 21 deletions

View File

@ -34,6 +34,7 @@ class BaseRepo
$entity->forceFill([
'created_by' => user()->id,
'updated_by' => user()->id,
'owned_by' => user()->id,
]);
$entity->refreshSlug();
$entity->save();

View File

@ -130,6 +130,7 @@ class PageRepo
$page = (new Page())->forceFill([
'name' => trans('entities.pages_initial_name'),
'created_by' => user()->id,
'owned_by' => user()->id,
'updated_by' => user()->id,
'draft' => true,
]);