Allow artworks to have one primary category and extra secondaries.
Keep artwork_category as membership, store a deterministic primary_category_id, and let upload plus studio pick up to five additional same-type categories without changing canonical URLs.
This commit is contained in:
@@ -117,7 +117,8 @@ final class StudioBulkActionService
|
||||
throw new \InvalidArgumentException('category_id required for change_category');
|
||||
}
|
||||
|
||||
$artwork->categories()->sync([(int) $params['category_id']]);
|
||||
app(\App\Services\Artworks\ArtworkCategoryService::class)
|
||||
->sync($artwork, (int) $params['category_id'], [], 'moderator');
|
||||
}
|
||||
|
||||
private function addTags(Artwork $artwork, array $params): void
|
||||
|
||||
Reference in New Issue
Block a user