'required|integer', 'commentable_type' => 'required|string|in:tour,flight', 'body' => 'required|string|max:1000', ]; if (!auth()->check()) { $rules['guest_name'] = 'required|string|max:150'; } return $rules; } }