has('html_message') && $this->has('html')) { $this->merge(['html_message' => $this->input('html')]); } if (! $this->has('recipient') && $this->has('to')) { $this->merge(['recipient' => $this->input('to')]); } } public function authorize(): bool { return auth()->check(); } public function rules(): array { return [ 'recipient' => ['required', 'email', 'max:255'], 'subject' => ['required', 'string', 'max:255'], 'html_message' => ['required', 'string'], 'profile' => ['nullable', 'string', 'max:50'], 'reply_to_email' => ['nullable', 'email', 'max:255'], 'reply_to_name' => ['nullable', 'string', 'max:255'], 'return_url' => ['nullable', 'string', 'max:2048'], ]; } }