Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Volt components do not support namespacing, causing conflicts across modules with same component names

Đang mở
#137 7 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
laravel, php
Lĩnh vực
backend, web-dev

Hướng nghiên cứu

Issue mô tả Volt components và namespaced Livewire/Blade tags nhưng không nêu tên file hoặc test nào. Hãy bắt đầu bằng cách lần theo cách Volt đăng ký components và cách Livewire phân giải namespaced tags; hoàn tất khi hai components cùng tên có thể được tham chiếu độc lập mà một component không ghi đè component kia.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Volt Version

1.7

Laravel Version

12

PHP Version

8.4

Database Driver & Version

No response

Description

In my Laravel project, I follow a modular structure where each module can have its own set of Livewire components. It’s common for different modules to have components with the same name (e.g., Button), and Livewire allows for namespacing to prevent conflicts:

class Button extends Component
{
    public function render()
    {
        return view('somemodule::livewire.button');
    }
}

Then in the Blade view, I can use:

<livewire:somemodule::button />

This works perfectly and avoids naming collisions.

However, when using Volt components, the render() method is not defined, and as a result, I cannot specify a view path or namespace. Volt components are always referenced like:

<livewire:button />

If multiple Volt components with the same name exist across different modules, one of them overwrites the others. This makes it impossible to use the same component name in different modules when using Volt.

Steps To Reproduce
  1. Create a Laravel modular project structure.
  2. In ModuleA, create a Volt component named Button.
  3. In ModuleB, create another Volt component also named Button.
  4. Attempt to reference both components in a Blade file (components will not be found):
<livewire:module-a::button />
<livewire:module-b::button />
  1. Observe that only one of the components is registered and used, due to lack of namespacing in Volt.
<livewire:button />
Ngôn ngữ chính
PHP
Star
423
Fork
36
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của livewire/volt

Tất cả issue của livewire/volt

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.