Skip to content

Commit 6212f61

Browse files
author
Sébastien HEYD
committed
fix(user): add method existence check before calling bootLaratrustUserTrait
1 parent 3d841ed commit 6212f61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Models/User.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ class User extends Authenticatable implements MustVerifyEmail, LaratrustUser
4747
public static function boot()
4848
{
4949
parent::boot();
50-
self::bootLaratrustUserTrait();
50+
51+
if (method_exists(static::class, 'bootLaratrustUserTrait')) {
52+
self::bootLaratrustUserTrait();
53+
}
5154
}
5255

5356
/**

0 commit comments

Comments
 (0)