Make projects depend on templates

This commit is contained in:
2026-09-08 10:25:52 +00:00
committed by Twyco
parent 40f9b473fc
commit fef82cb88f
19 changed files with 281 additions and 14 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ class StoreProjectRequest extends FormRequest
Rule::requiredIf(fn (): bool => $this->input('creation_mode') === 'template'),
'nullable',
'integer',
Rule::exists('project_templates', 'id'),
Rule::exists('project_templates', 'id')->where(fn ($query) => $query->where('is_published', true)),
],
'copy_areas' => ['nullable', 'array'],
'copy_areas.*' => [