@@ -3,11 +3,11 @@ |
||
3 | 3 | namespace Spatie\Activitylog; |
4 | 4 | |
5 | 5 | use Illuminate\Auth\AuthManager; |
6 | +use Illuminate\Contracts\Config\Repository; |
|
6 | 7 | use Illuminate\Database\Eloquent\Model; |
7 | -use Spatie\Activitylog\Models\Activity; |
|
8 | 8 | use Illuminate\Support\Traits\Macroable; |
9 | -use Illuminate\Contracts\Config\Repository; |
|
10 | 9 | use Spatie\Activitylog\Exceptions\CouldNotLogActivity; |
10 | +use Spatie\Activitylog\Models\Activity; |
|
11 | 11 | |
12 | 12 | class ActivityLogger |
13 | 13 | { |
@@ -55,6 +55,10 @@ discard block |
||
55 | 55 | return collect($config['auth']['guards'])->keys()->all(); |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param Repository $config |
|
60 | + * @param AuthManager $auth |
|
61 | + */ |
|
58 | 62 | private function getUsedGuardOrDefaultDriver($config, $auth) |
59 | 63 | { |
60 | 64 | $guards = $this->getGuardsFromConfig($config); |
@@ -138,7 +142,7 @@ discard block |
||
138 | 142 | /** |
139 | 143 | * @param string $description |
140 | 144 | * |
141 | - * @return null|mixed |
|
145 | + * @return null|Model |
|
142 | 146 | */ |
143 | 147 | public function log(string $description) |
144 | 148 | { |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | 6 | use Illuminate\Support\ServiceProvider; |
7 | -use Spatie\Activitylog\Models\Activity; |
|
8 | 7 | use Spatie\Activitylog\Exceptions\InvalidConfiguration; |
8 | +use Spatie\Activitylog\Models\Activity; |
|
9 | 9 | |
10 | 10 | class ActivitylogServiceProvider extends ServiceProvider |
11 | 11 | { |
@@ -2,13 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace Spatie\Activitylog\Traits; |
4 | 4 | |
5 | -use Illuminate\Support\Collection; |
|
6 | -use Spatie\Activitylog\ActivityLogger; |
|
7 | 5 | use Illuminate\Database\Eloquent\Model; |
8 | -use Spatie\Activitylog\Models\Activity; |
|
6 | +use Illuminate\Database\Eloquent\Relations\MorphMany; |
|
9 | 7 | use Illuminate\Database\Eloquent\SoftDeletes; |
8 | +use Illuminate\Support\Collection; |
|
9 | +use Spatie\Activitylog\ActivityLogger; |
|
10 | 10 | use Spatie\Activitylog\ActivitylogServiceProvider; |
11 | -use Illuminate\Database\Eloquent\Relations\MorphMany; |
|
12 | 11 | |
13 | 12 | trait LogsActivity |
14 | 13 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Spatie\Activitylog\Traits; |
4 | 4 | |
5 | -use Spatie\Activitylog\ActivitylogServiceProvider; |
|
6 | 5 | use Illuminate\Database\Eloquent\Relations\MorphMany; |
6 | +use Spatie\Activitylog\ActivitylogServiceProvider; |
|
7 | 7 | |
8 | 8 | trait CausesActivity |
9 | 9 | { |