Skip to content

Commit d8daeca

Browse files
authored
Merge pull request spatie#1053 from Gnative/main
Fixes causer not being set on ActivityLog when using a different guard other than Laravel's default
2 parents daa1abc + 1f475de commit d8daeca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/activitylog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/*
2323
* You can specify an auth driver here that gets user models.
24-
* If this is null we'll use the default Laravel auth driver.
24+
* If this is null we'll use the current Laravel auth driver.
2525
*/
2626
'default_auth_driver' => null,
2727

src/CauserResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CauserResolver
1212
{
1313
protected AuthManager $authManager;
1414

15-
protected string $authDriver;
15+
protected string | null $authDriver;
1616

1717
protected Closure | null $resolverOverride = null;
1818

@@ -22,7 +22,7 @@ public function __construct(Repository $config, AuthManager $authManager)
2222
{
2323
$this->authManager = $authManager;
2424

25-
$this->authDriver = $config['activitylog']['default_auth_driver'] ?? $this->authManager->getDefaultDriver();
25+
$this->authDriver = $config['activitylog']['default_auth_driver'];
2626
}
2727

2828
public function resolve(Model | int | string | null $subject = null): ?Model

0 commit comments

Comments
 (0)