2 |
3 |
6 |
](https://spatie.be/github-ad-click/laravel-activitylog)
81 |
82 | We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
83 |
84 | We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
85 |
86 | ## Documentation
87 |
88 | You'll find the documentation on [https://spatie.be/docs/laravel-activitylog/introduction](https://spatie.be/docs/laravel-activitylog/introduction).
89 |
90 | Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the activity log? Feel free to [create an issue on GitHub](https://github.com/spatie/laravel-activitylog/issues), we'll try to address it as soon as possible.
91 |
92 | ## Installation
93 |
94 | You can install the package via composer:
95 |
96 | ```bash
97 | composer require spatie/laravel-activitylog
98 | ```
99 |
100 | The package will automatically register itself.
101 |
102 | You can publish the migration with:
103 |
104 | ```bash
105 | php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"
106 | ```
107 |
108 | _Note_: The default migration assumes you are using integers for your model IDs. If you are using UUIDs, or some other format, adjust the format of the `subject_id` and `causer_id` fields in the published migration before continuing.
109 |
110 | After publishing the migration you can create the `activity_log` table by running the migrations:
111 |
112 | ```bash
113 | php artisan migrate
114 | ```
115 |
116 | You can optionally publish the config file with:
117 |
118 | ```bash
119 | php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-config"
120 | ```
121 |
122 | ## Changelog
123 |
124 | Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.
125 |
126 | ## Upgrading
127 |
128 | Please see [UPGRADING](UPGRADING.md) for details.
129 |
130 | ## Testing
131 |
132 | ```bash
133 | composer test
134 | ```
135 |
136 | ## Contributing
137 |
138 | Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
139 |
140 | ## Security
141 |
142 | If you've found a bug regarding security please mail [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.
143 |
144 | ## Credits
145 |
146 | - [Freek Van der Herten](https://github.com/freekmurze)
147 | - [Sebastian De Deyne](https://github.com/sebastiandedeyne)
148 | - [Tom Witkowski](https://github.com/Gummibeer)
149 | - [All Contributors](../../contributors)
150 |
151 | Special thanks to [Ahmed Nagi](https://github.com/nagi1) for all the work he put in `v4` and to [Caneco](https://twitter.com/caneco) for the original logo.
152 |
153 | ## License
154 |
155 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
156 |
--------------------------------------------------------------------------------
/src/ActivityLogger.php:
--------------------------------------------------------------------------------
1 | causerResolver = $causerResolver;
33 |
34 | $this->batch = $batch;
35 |
36 | $this->defaultLogName = $config['activitylog']['default_log_name'];
37 |
38 | $this->logStatus = $logStatus;
39 | }
40 |
41 | public function setLogStatus(ActivityLogStatus $logStatus): static
42 | {
43 | $this->logStatus = $logStatus;
44 |
45 | return $this;
46 | }
47 |
48 | public function performedOn(Model $model): static
49 | {
50 | $this->getActivity()->subject()->associate($model);
51 |
52 | return $this;
53 | }
54 |
55 | public function on(Model $model): static
56 | {
57 | return $this->performedOn($model);
58 | }
59 |
60 | public function causedBy(Model | int | string | null $modelOrId): static
61 | {
62 | if ($modelOrId === null) {
63 | return $this;
64 | }
65 |
66 | $model = $this->causerResolver->resolve($modelOrId);
67 |
68 | $this->getActivity()->causer()->associate($model);
69 |
70 | return $this;
71 | }
72 |
73 | public function by(Model | int | string | null $modelOrId): static
74 | {
75 | return $this->causedBy($modelOrId);
76 | }
77 |
78 | public function causedByAnonymous(): static
79 | {
80 | $this->activity->causer_id = null;
81 | $this->activity->causer_type = null;
82 |
83 | return $this;
84 | }
85 |
86 | public function byAnonymous(): static
87 | {
88 | return $this->causedByAnonymous();
89 | }
90 |
91 | public function event(string $event): static
92 | {
93 | return $this->setEvent($event);
94 | }
95 |
96 | public function setEvent(string $event): static
97 | {
98 | $this->activity->event = $event;
99 |
100 | return $this;
101 | }
102 |
103 | public function withProperties(mixed $properties): static
104 | {
105 | $this->getActivity()->properties = collect($properties);
106 |
107 | return $this;
108 | }
109 |
110 | public function withProperty(string $key, mixed $value): static
111 | {
112 | $this->getActivity()->properties = $this->getActivity()->properties->put($key, $value);
113 |
114 | return $this;
115 | }
116 |
117 | public function createdAt(DateTimeInterface $dateTime): static
118 | {
119 | $this->getActivity()->created_at = Carbon::instance($dateTime);
120 |
121 | return $this;
122 | }
123 |
124 | public function useLog(?string $logName): static
125 | {
126 | $this->getActivity()->log_name = $logName;
127 |
128 | return $this;
129 | }
130 |
131 | public function inLog(?string $logName): static
132 | {
133 | return $this->useLog($logName);
134 | }
135 |
136 | public function tap(callable $callback, ?string $eventName = null): static
137 | {
138 | call_user_func($callback, $this->getActivity(), $eventName);
139 |
140 | return $this;
141 | }
142 |
143 | public function enableLogging(): static
144 | {
145 | $this->logStatus->enable();
146 |
147 | return $this;
148 | }
149 |
150 | public function disableLogging(): static
151 | {
152 | $this->logStatus->disable();
153 |
154 | return $this;
155 | }
156 |
157 | public function log(string $description): ?ActivityContract
158 | {
159 | if ($this->logStatus->disabled()) {
160 | return null;
161 | }
162 |
163 | $activity = $this->activity;
164 |
165 | $activity->description = $this->replacePlaceholders(
166 | $activity->description ?? $description,
167 | $activity
168 | );
169 |
170 | if (isset($activity->subject) && method_exists($activity->subject, 'tapActivity')) {
171 | $this->tap([$activity->subject, 'tapActivity'], $activity->event ?? '');
172 | }
173 |
174 | $activity->save();
175 |
176 | $this->activity = null;
177 |
178 | return $activity;
179 | }
180 |
181 | public function withoutLogs(Closure $callback): mixed
182 | {
183 | if ($this->logStatus->disabled()) {
184 | return $callback();
185 | }
186 |
187 | $this->logStatus->disable();
188 |
189 | try {
190 | return $callback();
191 | } finally {
192 | $this->logStatus->enable();
193 | }
194 | }
195 |
196 | protected function replacePlaceholders(string $description, ActivityContract $activity): string
197 | {
198 | return preg_replace_callback('/:[a-z0-9._-]+(?$attribute;
210 |
211 | if (is_null($attributeValue)) {
212 | return $match;
213 | }
214 |
215 | return data_get($attributeValue, $propertyName, $match);
216 | }, $description);
217 | }
218 |
219 | protected function getActivity(): ActivityContract
220 | {
221 | if (! $this->activity instanceof ActivityContract) {
222 | $this->activity = ActivitylogServiceProvider::getActivityModelInstance();
223 | $this
224 | ->useLog($this->defaultLogName)
225 | ->withProperties([])
226 | ->causedBy($this->causerResolver->resolve());
227 |
228 | $this->activity->batch_uuid = $this->batch->getUuid();
229 | }
230 |
231 | return $this->activity;
232 | }
233 | }
234 |
--------------------------------------------------------------------------------
/src/Traits/LogsActivity.php:
--------------------------------------------------------------------------------
1 | each(function ($eventName) {
40 | if ($eventName === 'updated') {
41 | static::updating(function (Model $model) {
42 | $oldValues = (new static())->setRawAttributes($model->getRawOriginal());
43 | $model->oldAttributes = static::logChanges($oldValues);
44 | });
45 | }
46 |
47 | static::$eventName(function (Model $model) use ($eventName) {
48 | $model->activitylogOptions = $model->getActivitylogOptions();
49 |
50 | if (! $model->shouldLogEvent($eventName)) {
51 | return;
52 | }
53 |
54 | $changes = $model->attributeValuesToBeLogged($eventName);
55 |
56 | $description = $model->getDescriptionForEvent($eventName);
57 |
58 | $logName = $model->getLogNameToUse();
59 |
60 | // Submitting empty description will cause place holder replacer to fail.
61 | if ($description == '') {
62 | return;
63 | }
64 |
65 | if ($model->isLogEmpty($changes) && ! $model->activitylogOptions->submitEmptyLogs) {
66 | return;
67 | }
68 |
69 | // User can define a custom pipelines to mutate, add or remove from changes
70 | // each pipe receives the event carrier bag with changes and the model in
71 | // question every pipe should manipulate new and old attributes.
72 | $event = app(Pipeline::class)
73 | ->send(new EventLogBag($eventName, $model, $changes, $model->activitylogOptions))
74 | ->through(static::$changesPipes)
75 | ->thenReturn();
76 |
77 | // Actual logging
78 | $logger = app(ActivityLogger::class)
79 | ->useLog($logName)
80 | ->event($eventName)
81 | ->performedOn($model)
82 | ->withProperties($event->changes);
83 |
84 | if (method_exists($model, 'tapActivity')) {
85 | $logger->tap([$model, 'tapActivity'], $eventName);
86 | }
87 |
88 | $logger->log($description);
89 |
90 | // Reset log options so the model can be serialized.
91 | $model->activitylogOptions = null;
92 | });
93 | });
94 | }
95 |
96 | public static function addLogChange(LoggablePipe $pipe): void
97 | {
98 | static::$changesPipes[] = $pipe;
99 | }
100 |
101 | public function isLogEmpty(array $changes): bool
102 | {
103 | return empty($changes['attributes'] ?? []) && empty($changes['old'] ?? []);
104 | }
105 |
106 | public function disableLogging(): self
107 | {
108 | $this->enableLoggingModelsEvents = false;
109 |
110 | return $this;
111 | }
112 |
113 | public function enableLogging(): self
114 | {
115 | $this->enableLoggingModelsEvents = true;
116 |
117 | return $this;
118 | }
119 |
120 | public function activities(): MorphMany
121 | {
122 | return $this->morphMany(ActivitylogServiceProvider::determineActivityModel(), 'subject');
123 | }
124 |
125 | public function getDescriptionForEvent(string $eventName): string
126 | {
127 | if (! empty($this->activitylogOptions->descriptionForEvent)) {
128 | return ($this->activitylogOptions->descriptionForEvent)($eventName);
129 | }
130 |
131 | return $eventName;
132 | }
133 |
134 | public function getLogNameToUse(): ?string
135 | {
136 | if (! empty($this->activitylogOptions->logName)) {
137 | return $this->activitylogOptions->logName;
138 | }
139 |
140 | return config('activitylog.default_log_name');
141 | }
142 |
143 | /**
144 | * Get the event names that should be recorded.
145 | **/
146 | protected static function eventsToBeRecorded(): Collection
147 | {
148 | if (isset(static::$recordEvents)) {
149 | return collect(static::$recordEvents);
150 | }
151 |
152 | $events = collect([
153 | 'created',
154 | 'updated',
155 | 'deleted',
156 | ]);
157 |
158 | if (collect(class_uses_recursive(static::class))->contains(SoftDeletes::class)) {
159 | $events->push('restored');
160 | }
161 |
162 | return $events;
163 | }
164 |
165 | protected function shouldLogEvent(string $eventName): bool
166 | {
167 | $logStatus = app(ActivityLogStatus::class);
168 |
169 | if (! $this->enableLoggingModelsEvents || $logStatus->disabled()) {
170 | return false;
171 | }
172 |
173 | if (! in_array($eventName, ['created', 'updated'])) {
174 | return true;
175 | }
176 |
177 | // Do not log update event if the model is restoring
178 | if ($this->isRestoring()) {
179 | return false;
180 | }
181 |
182 | // Do not log update event if only ignored attributes are changed.
183 | return (bool) count(Arr::except($this->getDirty(), $this->activitylogOptions->dontLogIfAttributesChangedOnly));
184 | }
185 |
186 | /**
187 | * Determines if the model is restoring.
188 | **/
189 | protected function isRestoring(): bool
190 | {
191 | $deletedAtColumn = method_exists($this, 'getDeletedAtColumn')
192 | ? $this->getDeletedAtColumn()
193 | : 'deleted_at';
194 |
195 | return $this->isDirty($deletedAtColumn) && count($this->getDirty()) === 1;
196 | }
197 |
198 | /**
199 | * Determines what attributes needs to be logged based on the configuration.
200 | **/
201 | public function attributesToBeLogged(): array
202 | {
203 | $this->activitylogOptions = $this->getActivitylogOptions();
204 |
205 | $attributes = [];
206 |
207 | // Check if fillable attributes will be logged then merge it to the local attributes array.
208 | if ($this->activitylogOptions->logFillable) {
209 | $attributes = array_merge($attributes, $this->getFillable());
210 | }
211 |
212 | // Determine if unguarded attributes will be logged.
213 | if ($this->shouldLogUnguarded()) {
214 |
215 | // Get only attribute names, not intrested in the values here then guarded
216 | // attributes. get only keys than not present in guarded array, because
217 | // we are logging the unguarded attributes and we cant have both!
218 |
219 | $attributes = array_merge($attributes, array_diff(array_keys($this->getAttributes()), $this->getGuarded()));
220 | }
221 |
222 | if (! empty($this->activitylogOptions->logAttributes)) {
223 |
224 | // Filter * from the logAttributes because will deal with it separately
225 | $attributes = array_merge($attributes, array_diff($this->activitylogOptions->logAttributes, ['*']));
226 |
227 | // If there's * get all attributes then merge it, dont respect $guarded or $fillable.
228 | if (in_array('*', $this->activitylogOptions->logAttributes)) {
229 | $attributes = array_merge($attributes, array_keys($this->getAttributes()));
230 | }
231 | }
232 |
233 | if ($this->activitylogOptions->logExceptAttributes) {
234 |
235 | // Filter out the attributes defined in ignoredAttributes out of the local array
236 | $attributes = array_diff($attributes, $this->activitylogOptions->logExceptAttributes);
237 | }
238 |
239 | return $attributes;
240 | }
241 |
242 | public function shouldLogUnguarded(): bool
243 | {
244 | if (! $this->activitylogOptions->logUnguarded) {
245 | return false;
246 | }
247 |
248 | // This case means all of the attributes are guarded
249 | // so we'll not have any unguarded anyway.
250 | if (in_array('*', $this->getGuarded())) {
251 | return false;
252 | }
253 |
254 | return true;
255 | }
256 |
257 | /**
258 | * Determines values that will be logged based on the difference.
259 | **/
260 | public function attributeValuesToBeLogged(string $processingEvent): array
261 | {
262 | // no loggable attributes, no values to be logged!
263 | if (! count($this->attributesToBeLogged())) {
264 | return [];
265 | }
266 |
267 | $properties['attributes'] = static::logChanges(
268 |
269 | // if the current event is retrieved, get the model itself
270 | // else get the fresh default properties from database
271 | // as wouldn't be part of the saved model instance.
272 | $processingEvent == 'retrieved'
273 | ? $this
274 | : (
275 | $this->exists
276 | ? $this->fresh() ?? $this
277 | : $this
278 | )
279 | );
280 |
281 | if (static::eventsToBeRecorded()->contains('updated') && $processingEvent == 'updated') {
282 |
283 | // Fill the attributes with null values.
284 | $nullProperties = array_fill_keys(array_keys($properties['attributes']), null);
285 |
286 | // Populate the old key with keys from database and from old attributes.
287 | $properties['old'] = array_merge($nullProperties, $this->oldAttributes);
288 |
289 | // Fail safe.
290 | $this->oldAttributes = [];
291 | }
292 |
293 | if ($this->activitylogOptions->logOnlyDirty && isset($properties['old'])) {
294 |
295 | // Get difference between the old and new attributes.
296 | $properties['attributes'] = array_udiff_assoc(
297 | $properties['attributes'],
298 | $properties['old'],
299 | function ($new, $old) {
300 | // Strict check for php's weird behaviors
301 | if ($old === null || $new === null) {
302 | return $new === $old ? 0 : 1;
303 | }
304 |
305 | // Handles Date interval comparisons since php cannot use spaceship
306 | // Operator to compare them and will throw ErrorException.
307 | if ($old instanceof DateInterval) {
308 | return CarbonInterval::make($old)->equalTo($new) ? 0 : 1;
309 | } elseif ($new instanceof DateInterval) {
310 | return CarbonInterval::make($new)->equalTo($old) ? 0 : 1;
311 | }
312 |
313 | return $new <=> $old;
314 | }
315 | );
316 |
317 | $properties['old'] = collect($properties['old'])
318 | ->only(array_keys($properties['attributes']))
319 | ->all();
320 | }
321 |
322 | if (static::eventsToBeRecorded()->contains('deleted') && $processingEvent == 'deleted') {
323 | $properties['old'] = $properties['attributes'];
324 | unset($properties['attributes']);
325 | }
326 |
327 | return $properties;
328 | }
329 |
330 | public static function logChanges(Model $model): array
331 | {
332 | $changes = [];
333 | $attributes = $model->attributesToBeLogged();
334 |
335 | foreach ($attributes as $attribute) {
336 | if (Str::contains($attribute, '.')) {
337 | $changes += self::getRelatedModelAttributeValue($model, $attribute);
338 |
339 | continue;
340 | }
341 |
342 | if (Str::contains($attribute, '->')) {
343 | Arr::set(
344 | $changes,
345 | str_replace('->', '.', $attribute),
346 | static::getModelAttributeJsonValue($model, $attribute)
347 | );
348 |
349 | continue;
350 | }
351 |
352 | $changes[$attribute] = in_array($attribute, $model->activitylogOptions->attributeRawValues)
353 | ? $model->getAttributeFromArray($attribute)
354 | : $model->getAttribute($attribute);
355 |
356 | if (is_null($changes[$attribute])) {
357 | continue;
358 | }
359 |
360 | if ($model->isDateAttribute($attribute)) {
361 | $changes[$attribute] = $model->serializeDate(
362 | $model->asDateTime($changes[$attribute])
363 | );
364 | }
365 |
366 | if ($model->hasCast($attribute)) {
367 | $cast = $model->getCasts()[$attribute];
368 |
369 | if ($model->isEnumCastable($attribute)) {
370 | try {
371 | $changes[$attribute] = $model->getStorableEnumValue($changes[$attribute]);
372 | } catch (\ArgumentCountError $e) {
373 | // In Laravel 11, this method has an extra argument
374 | // https://github.com/laravel/framework/pull/47465
375 | $changes[$attribute] = $model->getStorableEnumValue($cast, $changes[$attribute]);
376 | }
377 | }
378 |
379 | if ($model->isCustomDateTimeCast($cast) || $model->isImmutableCustomDateTimeCast($cast)) {
380 | $changes[$attribute] = $model->asDateTime($changes[$attribute])->format(explode(':', $cast, 2)[1]);
381 | }
382 | }
383 | }
384 |
385 | return $changes;
386 | }
387 |
388 | protected static function getRelatedModelAttributeValue(Model $model, string $attribute): array
389 | {
390 | $relatedModelNames = explode('.', $attribute);
391 | $relatedAttribute = array_pop($relatedModelNames);
392 |
393 | $attributeName = [];
394 | $relatedModel = $model;
395 |
396 | do {
397 | $attributeName[] = $relatedModelName = static::getRelatedModelRelationName($relatedModel, array_shift($relatedModelNames));
398 |
399 | $relatedModel = $relatedModel->$relatedModelName ?? $relatedModel->$relatedModelName();
400 | } while (! empty($relatedModelNames));
401 |
402 | $attributeName[] = $relatedAttribute;
403 |
404 | return [implode('.', $attributeName) => $relatedModel->$relatedAttribute ?? null];
405 | }
406 |
407 | protected static function getRelatedModelRelationName(Model $model, string $relation): string
408 | {
409 | return Arr::first([
410 | $relation,
411 | Str::snake($relation),
412 | Str::camel($relation),
413 | ], function (string $method) use ($model): bool {
414 | return method_exists($model, $method);
415 | }, $relation);
416 | }
417 |
418 | protected static function getModelAttributeJsonValue(Model $model, string $attribute): mixed
419 | {
420 | $path = explode('->', $attribute);
421 | $modelAttribute = array_shift($path);
422 | $modelAttribute = collect($model->getAttribute($modelAttribute));
423 |
424 | return data_get($modelAttribute, implode('.', $path));
425 | }
426 | }
427 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to `spatie/laravel-activitylog` will be documented in this file
4 |
5 | ## 4.10.2 - 2025-06-15
6 |
7 | ### What's Changed
8 |
9 | * Update README.md by @alisalehi1380 in https://github.com/spatie/laravel-activitylog/pull/1380
10 | * Bump stefanzweifel/git-auto-commit-action from 5.1.0 to 5.2.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1385
11 | * Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1392
12 |
13 | ### New Contributors
14 |
15 | * @alisalehi1380 made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1380
16 |
17 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.10.1...4.10.2
18 |
19 | ## 4.10.1 - 2025-02-10
20 |
21 | ### What's Changed
22 |
23 | * Laravel 12.x Support by @erikn69 in https://github.com/spatie/laravel-activitylog/pull/1370
24 |
25 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.10.0...4.10.1
26 |
27 | ## 4.10.0 - 2025-02-10
28 |
29 | ### What's Changed
30 |
31 | * Bump stefanzweifel/git-auto-commit-action from 5.0.1 to 5.1.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1365
32 | * Bump actions/stale from 9.0.0 to 9.1.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1367
33 | * Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1368
34 | * Activity Facade by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/1372
35 |
36 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.9.1...4.10.0
37 |
38 | ## 4.9.1 - 2024-11-18
39 |
40 | ### What's Changed
41 |
42 | * Update using-multiple-logs.md by @tobischulz in https://github.com/spatie/laravel-activitylog/pull/1345
43 | * fix: php 8.4 deprecation warnings by @ashleyshenton in https://github.com/spatie/laravel-activitylog/pull/1351
44 |
45 | ### New Contributors
46 |
47 | * @tobischulz made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1345
48 | * @ashleyshenton made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1351
49 |
50 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.9.0...4.9.1
51 |
52 | ## 4.9.0 - 2024-10-18
53 |
54 | ### What's Changed
55 |
56 | * Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1298
57 | * Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 5.0.1 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1293
58 | * Corrected the link to the event logging example by @makaronnik in https://github.com/spatie/laravel-activitylog/pull/1300
59 | * Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1315
60 | * Update batch-logs.md by @jesseschutt in https://github.com/spatie/laravel-activitylog/pull/1320
61 | * Adjust PHPDoc type for causer and subject by @gtg-bantonio in https://github.com/spatie/laravel-activitylog/pull/1321
62 | * Add missing return type by @dwightwatson in https://github.com/spatie/laravel-activitylog/pull/1330
63 | * Possibility to define table name in environment file by @edwinvdpol in https://github.com/spatie/laravel-activitylog/pull/1334
64 |
65 | ### New Contributors
66 |
67 | * @makaronnik made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1300
68 | * @jesseschutt made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1320
69 | * @gtg-bantonio made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1321
70 | * @edwinvdpol made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1334
71 |
72 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.8.0...4.9.0
73 |
74 | ## 4.8.0 - 2024-03-08
75 |
76 | ### What's Changed
77 |
78 | * Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1183
79 | * Bump dependabot/fetch-metadata from 1.4.0 to 1.5.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1195
80 | * Bump dependabot/fetch-metadata from 1.5.0 to 1.5.1 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1196
81 | * Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1205
82 | * Add a missing apostrophe by @dwightwatson in https://github.com/spatie/laravel-activitylog/pull/1249
83 | * Bump actions/stale from 6.0.1 to 9.0.0 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1250
84 | * Bump actions/cache from 3 to 4 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1263
85 | * Add more detail to manipulating changes by @tonypartridge in https://github.com/spatie/laravel-activitylog/pull/1268
86 | * feat!: add laravel 11 support by @StevePorter92 in https://github.com/spatie/laravel-activitylog/pull/1276
87 |
88 | ### New Contributors
89 |
90 | * @dwightwatson made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1249
91 | * @tonypartridge made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1268
92 | * @StevePorter92 made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1276
93 |
94 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.7.3...4.8.0
95 |
96 | ## 4.7.3 - 2023-01-25
97 |
98 | ### What's Changed
99 |
100 | - Add Dependabot Automation by @patinthehat in https://github.com/spatie/laravel-activitylog/pull/1128
101 | - Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/laravel-activitylog/pull/1129
102 | - Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1156
103 | - Fix tests badge by @erikn69 in https://github.com/spatie/laravel-activitylog/pull/1153
104 | - Laravel 10.x support by @erikn69 in https://github.com/spatie/laravel-activitylog/pull/1152
105 | - Fix for replacePlaceholders with ending dot by @Stefan-Dressler in https://github.com/spatie/laravel-activitylog/pull/1154
106 |
107 | ### New Contributors
108 |
109 | - @patinthehat made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1128
110 | - @erikn69 made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1153
111 | - @Stefan-Dressler made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1154
112 |
113 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.7.2...4.7.3
114 |
115 | ## v4.7.2 - 2022-11-14
116 |
117 | ### What's Changed
118 |
119 | - Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1117
120 | - Bump actions/stale from 2.0.0 to 6.0.1 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1118
121 | - Bump stefanzweifel/git-auto-commit-action from 4.0.0 to 4.15.4 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1119
122 | - Add missing properties to Activity model by @AndreasHerss in https://github.com/spatie/laravel-activitylog/pull/1101
123 | - Bump actions/cache from 2 to 3 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1120
124 | - Fix enum casting by @Gummibeer in https://github.com/spatie/laravel-activitylog/pull/1121
125 |
126 | ### New Contributors
127 |
128 | - @dependabot made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1117
129 | - @AndreasHerss made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1101
130 |
131 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.7.1...4.7.2
132 |
133 | ## v4.7.1 - 2022-11-11
134 |
135 | ### What's Changed
136 |
137 | - Fix nullable custom properties in PHP 8.0 by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/1115
138 |
139 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.7.0...4.7.1
140 |
141 | ## v4.7.0 - 2022-11-10
142 |
143 | ### What's Changed
144 |
145 | - Fix indentation by @mouadziani in https://github.com/spatie/laravel-activitylog/pull/1092
146 | - Support non backed enum & php 8.1 by @pemudakoding in https://github.com/spatie/laravel-activitylog/pull/1110
147 |
148 | ### New Contributors
149 |
150 | - @mouadziani made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1092
151 | - @pemudakoding made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1110
152 |
153 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.6.0...4.7.0
154 |
155 | ## v4.6.0 - 2022-09-22
156 |
157 | ### What's Changed
158 |
159 | - Add a default value to `getExtraProperty()` by @grantholle in https://github.com/spatie/laravel-activitylog/pull/1090
160 |
161 | ### New Contributors
162 |
163 | - @grantholle made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1090
164 |
165 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.5.3...4.6.0
166 |
167 | ## 4.5.3 - 2022-05-31
168 |
169 | - Fix default auth guard for causer - [#1053](https://github.com/spatie/laravel-activitylog/pull/1053)
170 |
171 | ## 4.5.2 - 2022-04-21
172 |
173 | - Fix placeholder resolving - [#1038](https://github.com/spatie/laravel-activitylog/pull/1038)
174 |
175 | ## 4.5.1 - 2022-04-07
176 |
177 | - [Use scoped instances of instead of singletons (Octane support)](https://github.com/spatie/laravel-activitylog/commit/0d0075b9c56ed0c282f59037e71cdaa6a052d336)
178 |
179 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.5.0...4.5.1
180 |
181 | ## 4.5.0 - 2022-04-07
182 |
183 | ## What's Changed
184 |
185 | - Add `Conditionable` trait to `ActivityLogger` by @usernotnull in https://github.com/spatie/laravel-activitylog/pull/997
186 |
187 | ## New Contributors
188 |
189 | - @usernotnull made their first contribution in https://github.com/spatie/laravel-activitylog/pull/997
190 |
191 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.4.3...4.5.0
192 |
193 | ## 4.4.3 - 2022-04-07
194 |
195 | ## What's Changed
196 |
197 | - Fix model serialization when using `LogsActivity` with `setDescriptionForEvent()` by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/977
198 | - Fix activirt logging on model restore (#895) by @kryptamine in https://github.com/spatie/laravel-activitylog/pull/1000
199 | - Fix nullable log names by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/1029
200 | - Fix `tapActivity` when manually creating activity logs by @FrancisMawn in https://github.com/spatie/laravel-activitylog/pull/1031
201 |
202 | ## New Contributors
203 |
204 | - @stevebauman made their first contribution in https://github.com/spatie/laravel-activitylog/pull/977
205 | - @kryptamine made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1000
206 | - @FrancisMawn made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1031
207 |
208 | **Full Changelog**: https://github.com/spatie/laravel-activitylog/compare/4.4.2...4.4.3
209 |
210 | ## 4.4.2 - 2022-03-07
211 |
212 | - [#1018](https://github.com/spatie/laravel-activitylog/pull/1018)
213 |
214 | ## 4.4.1 - 2022-03-04
215 |
216 | - https://github.com/spatie/laravel-activitylog/pull/956
217 |
218 | ## 4.4.0 - 2022-01-12
219 |
220 | - allow Laravel 9
221 |
222 | ## 4.3.1 - 2021-10-20
223 |
224 | - Fix hardcoded `deleted_at` column usage - [#965](https://github.com/spatie/laravel-activitylog/issues/965)
225 |
226 | ## 4.3.0 - 2021-10-20
227 |
228 | - Add `\Spatie\Activitylog\LogOptions::useAttributeRawValues()` to log uncasted attributes - [#972](https://github.com/spatie/laravel-activitylog/issues/972)
229 |
230 | ## 4.2.0 - 2021-10-06
231 |
232 | - Add `immutable_date` cast support - [#969](https://github.com/spatie/laravel-activitylog/issues/969)
233 |
234 | ## 4.1.1 - 2021-07-23
235 |
236 | - Fix migration stub names - [#914](https://github.com/spatie/laravel-activitylog/issues/914)
237 |
238 | ## 4.1.0 - 2021-07-23
239 |
240 | - Add `\Spatie\Activitylog\LogBatch::setBatch(string $uuid)` method to keep batches across requests or multiple jobs - [#918](https://github.com/spatie/laravel-activitylog/issues/918)
241 |
242 | ## 4.0.0 - 2021-05-04
243 |
244 | PR: [#787](https://github.com/spatie/laravel-activitylog/pull/787)
245 | Special thanks to [Ahmed Nagi](https://github.com/nagi1).
246 |
247 | - Drop Laravel 6 and 7 support.
248 |
249 | - Drop PHP 7.x support.
250 |
251 | - Add `LogOptions` configuration object to replace all configuration properties.
252 |
253 | - Add ability to batch activity logs [#560](https://github.com/spatie/laravel-activitylog/issues/560)
254 |
255 | - Add Pipeline to customize logged changes data.
256 |
257 | - - Deep diff array/JSON sub-keys and respect for only-dirty, no-empty ... [#692](https://github.com/spatie/laravel-activitylog/issues/692) using new pipeline. See implementation in the tests.
258 |
259 | -
260 | -
261 | -
262 | -
263 | -
264 | -
265 | -
266 | -
267 | -
268 | -
269 | -
270 | - Implement a `CauserResolver` to define causer for current runtime [#582](https://github.com/spatie/laravel-activitylog/issues/582).
271 |
272 |
273 | ## 3.17.0 - 2021-03-02
274 |
275 | - drop PHP 7.2 support - [#855](https://github.com/spatie/laravel-activitylog/pull/855)
276 |
277 | ## 3.16.1 - 2020-11-03
278 |
279 | - add PHP 8.0 support - [#806](https://github.com/spatie/laravel-activitylog/pull/806)
280 |
281 | ## 3.16.0 - 2020-09-16
282 |
283 | - use `nullableMorphs()` in default migration - [#707](https://github.com/spatie/laravel-activitylog/pull/707)
284 | - add support for snake and camel cased related model attribute logging - [#721](https://github.com/spatie/laravel-activitylog/pull/721)
285 |
286 | ## 3.15.0 - 2020-09-14
287 |
288 | - Add multiple/chained relation attribute logging support - [#784](https://github.com/spatie/laravel-activitylog/pull/784)
289 |
290 | ## 3.14.3 - 2020-09-09
291 |
292 | - Add support for Laravel 8
293 |
294 | ## 3.14.2 - 2020-05-19
295 |
296 | - fix `retrieved` event logging
297 |
298 | ## 3.14.1 - 2020-03-23
299 |
300 | - revert breaking changes in `v3.14.0`
301 |
302 | ## 3.14.0 - 2020-03-23 - BC
303 |
304 | Please use `v3.14.1` instead - this release is breaking because of the new column. There is also a `v4.0.0-rc.1` release that equals to this one.
305 |
306 | - add `\Spatie\Activitylog\ActivityLogger::event()` method and column [#702](https://github.com/spatie/laravel-activitylog/pull/702)
307 |
308 | ## 3.13.0 - 2020-03-13
309 |
310 | - add `\Spatie\Activitylog\ActivityLogger::withoutLogs()` method [#695](https://github.com/spatie/laravel-activitylog/pull/695)
311 |
312 | ## 3.12.0 - 2020-03-13
313 |
314 | - respect custom date casts [#627](https://github.com/spatie/laravel-activitylog/pull/627)
315 |
316 | ## 3.11.4 - 2020-03-11
317 |
318 | - remove `spatie/string` dependency [#690](https://github.com/spatie/laravel-activitylog/pull/690)
319 |
320 | ## 3.11.3 - 2020-03-10
321 |
322 | - fix performance issue around global vs model log disabling [#682](https://github.com/spatie/laravel-activitylog/pull/682)
323 |
324 | ## 3.11.2 - 2020-03-10
325 |
326 | - fix Laravel 7 array/json casted attributes [#680](https://github.com/spatie/laravel-activitylog/pull/680)
327 |
328 | ## 3.11.1 - 2020-03-02
329 |
330 | - fix requirements
331 |
332 | ## 3.11.0 - 2020-03-02
333 |
334 | - add support for Laravel 7
335 |
336 | ## 3.10.0 - 2020-02-22
337 |
338 | - add ability to manually set created at date - [#622](https://github.com/spatie/laravel-activitylog/pull/622)
339 |
340 | ## 3.9.2 - 2020-02-04
341 |
342 | - drop support for Laravel 5
343 |
344 | ## 3.9.1 - 2019-10-15
345 |
346 | - fix default database connection - [#616](https://github.com/spatie/laravel-activitylog/pull/616)
347 |
348 | ## 3.9.0 - 2019-10-06
349 |
350 | - add anonymous causer with `null` value - [#605](https://github.com/spatie/laravel-activitylog/pull/605)
351 | - fix relationships to allow snake case keys - [#602](https://github.com/spatie/laravel-activitylog/pull/602)
352 | - add JOSN sub-key attribute logging - [#601](https://github.com/spatie/laravel-activitylog/pull/601)
353 |
354 | ## 3.8.0 - 2019-09-04
355 |
356 | - add support for Laravel 6
357 | - change fields with value `null` to be strictly compared when logging dirty fields [#453](https://github.com/spatie/laravel-activitylog/pull/453)
358 | - add composite indexes for subject and causer to migration
359 |
360 | ## 3.7.2 - 2019-08-28
361 |
362 | - do not export docs folder
363 |
364 | ## 3.7.1 - 2019-07-24
365 |
366 | - fix default database connection env var
367 |
368 | ## 3.7.0 - 2019-07-23
369 |
370 | - add database connection to configuration `activitylog.database_connection` and `ACTIVITY_LOGGER_DB_CONNECTION` env var [#568](https://github.com/spatie/laravel-activitylog/pull/568)
371 |
372 | ## 3.6.3 - 2019-07-23
373 |
374 | - fix deprecated `array_` helper [#569](https://github.com/spatie/laravel-activitylog/pull/569)
375 |
376 | ## 3.6.2 - 2019-07-16
377 |
378 | - fix existing description [#563](https://github.com/spatie/laravel-activitylog/pull/563)
379 |
380 | ## 3.6.1 - 2019-05-29
381 |
382 | - fix nullable date attributes [#546](https://github.com/spatie/laravel-activitylog/pull/546)
383 |
384 | ## 3.6.0 - 2019-05-28
385 |
386 | - update `properties` column type from `text` to `json` [#525](https://github.com/spatie/laravel-activitylog/pull/525)
387 | - update `subject_id` and `causer_id` column type from `integer` to `big_integer` and `unsigned` [#527](https://github.com/spatie/laravel-activitylog/pull/527)
388 | - fix attribute getter support in `DetectsChanges` trait [#534](https://github.com/spatie/laravel-activitylog/pull/534)
389 | - fix old attributes retrieval in `DetectsChanges` trait [#537](https://github.com/spatie/laravel-activitylog/pull/537)
390 | - clean up old attributes in `DetectsChanges` trait [#538](https://github.com/spatie/laravel-activitylog/pull/538)
391 |
392 | ## 3.5.0 - 2019-04-15
393 |
394 | - add days option to clean command [#497](https://github.com/spatie/laravel-activitylog/pull/497)
395 | - add `LogsActivity::$submitEmptyLogs` [#514](https://github.com/spatie/laravel-activitylog/pull/514)
396 |
397 | ## 3.4.0 - 2019-04-09
398 |
399 | - use `Illuminate\Contracts\Config\Repository` instead of `Illuminate\Config\Repository` [#505](https://github.com/spatie/laravel-activitylog/pull/505)
400 | - fix `logChanges()` [#512](https://github.com/spatie/laravel-activitylog/pull/512)
401 |
402 | ## 3.3.0 - 2019-04-08
403 |
404 | - drop support for Laravel 5.7 and lower
405 | - drop support for PHP 7.1 and lower
406 |
407 | ## 3.2.2 - 2019-02-27
408 |
409 | - add support for Laravel 5.8
410 | - fix logging hidden attributes
411 | - fix logging for a causer model without a provider
412 | - add code coverage reporting for repository
413 |
414 | ## 3.2.1 - 2019-02-01
415 |
416 | - use Str:: and Arr:: instead of helper methods
417 |
418 | ## 3.2.0 - 2019-01-29
419 |
420 | - add `ActivityLogger::tap()` method
421 | - add `LogsActivity::tapActivity()` method
422 | - the `ActivityLogger` will work on an activity model instance instead of cache variables
423 |
424 | ## 3.1.2 - 2018-10-18
425 |
426 | - add `shouldLogUnguarded()` method
427 | - fix typo in methodname `shouldLogOnlyDirty()`
428 |
429 | ## 3.1.1 - 2018-10-17
430 |
431 | - fix `$logUnguarded`
432 |
433 | ## 3.1.0 - 2018-10-17
434 |
435 | - add `$logUnguarded`
436 |
437 | ## 3.0.0 - 2018-10-16
438 |
439 | - the preferred way to get changes on an `Activity` model is through the `changes` property instead of the `changes()` function
440 | - the `activity` relation of the `CausesActivity` trait has been renamed to `actions`
441 | - the `activity` relation of the `LogsActivity` trait has been renamed to `activities`
442 | - the deprecated `loggedActivity` relation has been removed
443 | - the `HasActivity` trait has been removed.
444 | - fix for setting a custom table name for the `Activity` model via the `$table` property
445 | - support for PHP 7.0 has been dropped
446 |
447 | ## 2.8.4. - 2018-09-23
448 |
449 | - improve migration
450 |
451 | ## 2.8.3 - 2018-09-01
452 |
453 | - add support for L5.7
454 |
455 | ## 2.8.2 - 2018-07-28
456 |
457 | - allow `null` to be passed to `causedBy`
458 |
459 | ## 2.8.1 - 2018-07-28
460 |
461 | - make sure a fresh instance of `ActivityLogger` is used
462 |
463 | ## 2.8.0 - 2018-07-21
464 |
465 | - add `enableLogging()` and `disableLogging()`
466 |
467 | ## 2.7.0 - 2018-06-18
468 |
469 | - add ability to ignore changes to attributes specified in `$logAttributesToIgnore`
470 |
471 | ## 2.6.0 - 2018-04-03
472 |
473 | - add `table_name` config option
474 |
475 | ## 2.5.1 - 2018-02-11
476 |
477 | - improve support for soft deletes
478 |
479 | ## 2.5.0 - 2018-02-09
480 |
481 | - allow model to override the default log name
482 |
483 | ## 2.4.2 - 2018-02-08
484 |
485 | - add compatibility with L5.6
486 |
487 | ## 2.4.1 - 2018-01-20
488 |
489 | - use a `text` column for `description`
490 |
491 | ## 2.4.0 - 2018-01-20
492 |
493 | - add `HasActivity`
494 |
495 | ## 2.3.2 - 2017-12-13
496 |
497 | - fix bugs concerning `attributesToBeLogged`
498 |
499 | ## 2.3.1 - 2017-11-13
500 |
501 | - allow nullable relation when using `logChanges`
502 |
503 | ## 2.3.0 - 2017-11-07
504 |
505 | - add a `log` argument to `activitylog:clean`
506 |
507 | ## 2.2.0 - 2017-10-16
508 |
509 | - add support for logging all changed attributes using `*`
510 |
511 | ## 2.1.2 - 2017-09-28
512 |
513 | - fix for logging changes attributes when deleting soft deletable models
514 |
515 | ## 2.1.1 - 2017-09-12
516 |
517 | - make sure `properties` always is a collection
518 |
519 | ## 2.1.0 - 2017-09-19
520 |
521 | - added support for logging fillable attributes
522 |
523 | ## 2.0.0 - 2017-08-30
524 |
525 | - added support for Laravel 5.5, dropped support for older laravel versions
526 | - renamed config file from `laravel-activitylog` to `activitylog`
527 | - rename `getChangesAttribute` function to `changes` so it doesn't conflict with Laravel's native functionality
528 |
529 | ## 1.16.0 - 2017-06-28
530 |
531 | - added `enableLogging` and `disableLogging`
532 |
533 | ## 1.15.5 - 2017-08-08
534 |
535 | - fix model scope
536 |
537 | ## 1.15.4 - 2017-08-05
538 |
539 | - fix detecting `SoftDeletes`
540 |
541 | ## 1.15.3 - 2017-06-23
542 |
543 | - fix for when there is no 'web' guard
544 |
545 | ## 1.15.2 - 2017-06-15
546 |
547 | - fixes errors in `DetectsChanges`
548 |
549 | ## 1.15.1 - 2017-04-28
550 |
551 | - fixes error in `DetectsChanges`
552 |
553 | ## 1.15.0 - 2017-04-28
554 |
555 | - add compatibility with L5.1 and L5.2
556 |
557 | ## 1.14.0 - 2017-04-16
558 |
559 | - add support array/collection casted attributes when using `logDirtyOnly`
560 |
561 | ## 1.13.0 - 2017-04-16
562 |
563 | - add `logDirtyOnly`
564 |
565 | ## 1.12.2 - 2017-03-22
566 |
567 | - fix a bug where changes to a related model would not be logged
568 |
569 | ## 1.12.1 - 2017-02-12
570 |
571 | - avoid PHP error when dealing with placeholders that cannot be filled
572 |
573 | ## 1.12.0 - 2017-02-04
574 |
575 | - drop support for L5.2 and lower
576 | - add ability to log attributes of related models
577 |
578 | ## 1.11.0 - 2017-01-23
579 |
580 | - add support for L5.4
581 |
582 | ## 1.10.4 - 2017-01-20
583 |
584 | - `Activity` now extends from `Model` instead of `Eloquent`
585 |
586 | ## 1.10.2 - 2016-11-26
587 |
588 | - fix compatibilty for Laravel 5.1
589 |
590 | ## 1.10.1 - 2016-10-11
591 |
592 | - fix `scopeCausedBy` and `scopeForSubject`
593 |
594 | ## 1.10.0 - 2016-10-10
595 |
596 | - add support for `restored` event
597 |
598 | ## 1.9.2 - 2016-09-27
599 |
600 | - fixed a bug where the delete event would not be logged
601 |
602 | ## 1.9.1 - 2016-09-16
603 |
604 | - fixed the return value of `activity()->log()`. It will now return the created `Activity`-model.
605 |
606 | ## 1.9.0 - 2016-09-16
607 |
608 | - added `Macroable` to `ActivityLogger`
609 |
610 | ## 1.8.0 - 2016-09-12
611 |
612 | - added `causedBy` and `forSubject` scopes
613 |
614 | ## 1.7.1 - 2016-08-23
615 |
616 | - Added L5.3 compatibility
617 |
618 | ## 1.7.0 - 2016-08-17
619 |
620 | - Added `enabled` option in the config file.
621 |
622 | ## 1.6.0 - 2016-08-11
623 |
624 | - Added `ignoreChangedAttributes`
625 |
626 | ## 1.5.0 - 2016-08-11
627 |
628 | - Added support for using a custom `Activity` model
629 |
630 | ## 1.4.0 - 2016-08-10
631 |
632 | - Added support for soft deletes
633 |
634 | ## 1.3.2 - 2016-08-09
635 |
636 | - This version replaces version `1.3.0`
637 | - Dropped L5.1 compatibility
638 |
639 | ## 1.3.1 - 2016-08-09
640 |
641 | - this version removes the features introduced in 1.3.0 and is compatible with L5.1
642 |
643 | ## 1.3.0 - 2016-07-29
644 |
645 | **DO NOT USE THIS VERSION IF YOU'RE ON L5.1**
646 |
647 | Please upgrade to:
648 |
649 | - `1.3.1` for Laravel 5.1
650 | - `1.3.2` for Laravel 5.2 and higher
651 |
652 | Introduced features
653 |
654 | - made the auth driver configurable
655 |
656 | ## 1.3.0 - 2016-07-29
657 |
658 | - made the auth driver configurable
659 |
660 | ## 1.2.1 - 2016-07-09
661 |
662 | - use config repo contract
663 |
664 | ## 1.2.0 - 2016-07-08
665 |
666 | - added `getLogNameToUse`
667 |
668 | ## 1.1.0 - 2016-07-04
669 |
670 | - added `activity`-method on both the `CausesActivity` and `LogsActivity`-trait
671 |
672 | ## 1.0.3 - 2016-07-01
673 |
674 | - the package is now compatible with Laravel 5.1
675 |
676 | ## 1.0.2 - 2016-06-29
677 |
678 | - fixed naming of `inLog` scope
679 | - add `inLog` function alias
680 |
681 | ## 1.0.1 - 2016-06-29
682 |
683 | - fixed error when publishing migrations
684 |
685 | ## 1.0.0 - 2016-06-28
686 |
687 | - initial release
688 |
--------------------------------------------------------------------------------