News: normalize category select values; fix Studio news editor category persistence; add CSV→SQL generator and news_dates.sql

This commit is contained in:
2026-05-03 09:12:38 +02:00
parent a9dfa6ea11
commit 44354e5bea
4 changed files with 1860 additions and 170 deletions

View File

@@ -352,7 +352,7 @@ final class StudioNewsController extends Controller
'content' => ['required', 'string', 'max:500000'],
'cover_image' => ['nullable', 'string', 'max:2048'],
'type' => ['required', Rule::in(array_column($this->news->articleTypeOptions(), 'value'))],
'category_id' => ['nullable', 'integer', 'exists:news_categories,id'],
'category_id' => ['required', 'integer', 'exists:news_categories,id'],
'author_id' => ['nullable', 'integer', 'exists:users,id'],
'editorial_status' => ['required', Rule::in(array_column($this->news->editorialStatusOptions(), 'value'))],
'published_at' => ['nullable', 'date'],