'array', ]; /** * Get the workspace this author belongs to. */ public function workspace(): BelongsTo { return $this->belongsTo(Workspace::class); } /** * Get all content items by this author. */ public function contentItems(): HasMany { return $this->hasMany(ContentItem::class, 'author_id'); } /** * Scope to filter by workspace. */ public function scopeForWorkspace($query, int $workspaceId) { return $query->where('workspace_id', $workspaceId); } /** * Scope to find by WordPress ID. */ public function scopeByWpId($query, int $wpId) { return $query->where('wp_id', $wpId); } }