Skip to content
This repository was archived by the owner on Jun 1, 2019. It is now read-only.

Commit e5f92fd

Browse files
committed
Add support for namespaced user model
1 parent c9291ab commit e5f92fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Spatie/Activitylog/Models/Activity.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Eloquent;
44
use DateTime;
5+
use Config;
56

67
class Activity extends Eloquent {
78

@@ -19,7 +20,7 @@ class Activity extends Eloquent {
1920
*/
2021
public function user()
2122
{
22-
return $this->belongsTo('User', 'user_id');
23+
return $this->belongsTo(Config::get('auth.model'), 'user_id');
2324
}
2425

2526
protected $guarded = array('id');
@@ -34,4 +35,4 @@ public static function boot()
3435
$activity->created_at = new DateTime();
3536
});
3637
}
37-
}
38+
}

0 commit comments

Comments
 (0)