$entries * @property-read int|null $entries_count * @method static \Illuminate\Database\Eloquent\Builder|Author newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Author newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Author query() * @method static \Illuminate\Database\Eloquent\Builder|Author whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereUserId($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereWebsite($value) * @mixin \Eloquent */ class Author extends Model { use LogsActivity; protected $fillable = [ 'name', 'slug', 'user_id', 'website' ]; public function entries(): BelongsToMany { return $this->belongsToMany(Entry::class, 'entry_authors'); } public function user(): ?XenForoUser { if( !$this->user_id ) return null; return app(XenforoService::class)->getXfUser($this->user_id); } public function getActivitylogOptions(): LogOptions { return LogOptions::defaults() ->useLogName('author') ->logAll() ->logOnlyDirty() ->dontLogEmptyChanges() ->setDescriptionForEvent(fn(string $eventName) => "Author {$eventName}"); } }