1 <?php namespace BookStack\Traits;
3 use BookStack\Auth\User;
4 use Illuminate\Database\Eloquent\Relations\BelongsTo;
7 * @property int created_by
8 * @property int updated_by
10 trait HasCreatorAndUpdater
13 * Relation for the user that created this entity.
15 public function createdBy(): BelongsTo
17 return $this->belongsTo(User::class, 'created_by');
21 * Relation for the user that updated this entity.
23 public function updatedBy(): BelongsTo
25 return $this->belongsTo(User::class, 'updated_by');