Skip to content

Commit 6b1a4bb

Browse files
committed
Adicionado relacionamento com model user
Adicionado relacionamento com model user, autor responsável pela alteração.
1 parent 4b50625 commit 6b1a4bb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/OwenIt/Auditing/Log.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ public function owner()
2626
{
2727
return $this->morphTo();
2828
}
29+
30+
/**
31+
* Author responsible for the change
32+
*
33+
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
34+
*/
35+
public function author()
36+
{
37+
return $this->belongsTo(\Config::get('auth.model'));
38+
}
2939

3040
/**
3141
* Returns the object we have the history of

0 commit comments

Comments
 (0)