authService->check(); } public function toUpdatePageInput(Page $page): UpdatePageInput { return new UpdatePageInput( page: $page, seo: new SeoMetadata( title: $this->string('seo_title')->value(), description: $this->string('seo_description')->value(), ), title: $this->filled('title') ? $this->string('title')->value() : null, content: $this->string('content')->value(), ); } /** @return array */ public function rules(): array { return [ 'seo_title' => ['required', 'string', 'between:45,70'], 'seo_description' => ['required', 'string', 'between:50,160'], 'title' => ['nullable', 'string', 'min:3', 'max:255'], 'content' => ['required', 'string'], ]; } #[\Override] public function attributes(): array { return [ 'seo_title' => trans('validation.custom.attributes.seo_title'), 'seo_description' => trans('validation.custom.attributes.seo_description'), 'title' => trans('validation.attributes.title'), 'content' => trans('validation.attributes.content'), ]; } }