+ /**
+ * Get a new activity instance for the current user.
+ */
+ protected function newActivityForUser(string $key, ?int $bookId = null): Activity
+ {
+ return $this->activity->newInstance()->forceFill([
+ 'key' => strtolower($key),
+ 'user_id' => $this->user->id,
+ 'book_id' => $bookId ?? 0,
+ ]);
+ }