Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Resolve Nested Namespaces #3

Open
Fludem opened this issue Mar 17, 2024 · 0 comments
Open

Feature Request - Resolve Nested Namespaces #3

Fludem opened this issue Mar 17, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Fludem
Copy link

Fludem commented Mar 17, 2024

Hey,

I believe having the package resolve nested namespaces automatically would be a good feature.

For example:

So take a component in the namespace:

namespace ClockingSystems\Auth\Livewire\Pages;

Then in the config file we'll define this:

'class_namespaces' => [
        'clocking-systems.auth' => 'ClockingSystems\\Auth\\Livewire',
    ],

This will give this error when using a full page component:

Unable to find component: [clocking-systems.auth-login]

Changing the namespace to include the pages namespace will allow it to work:

'class_namespaces' => [
        'clocking-systems.auth' => 'ClockingSystems\\Auth\\Livewire\\Pages',
    ],

I believe it should work like this

'class_namespaces' => [
        'clocking-systems.auth' => 'ClockingSystems\\Auth\\Livewire',
    ],

Which allows use of components in nested namespaces such as

<livewire:clocking-systems.auth.pages.login/>
<livewire:clocking-systems.auth.modals.forgot-password/>

This is how the livewire component discovery works by default

@joserick joserick added the enhancement New feature or request label Mar 18, 2024
@joserick joserick self-assigned this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants