Skip to content

What's the reason for splitting views into Components and Pages in the admin hub? #172

Closed Answered by alecritson
pixelpeter asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @pixelpeter

Livewire auto-loads components based on the config setting in the main Laravel app. Being inside a package, we didn't want to try and mess around with it as it likely would have an impact on how Livewire works at the app level.

The issue was we can reference the component fine for the route, but as soon as you try and do any Livewire requests, it would throw a 404 as it can't auto-load the component since it doesn't live in the namespace.

The workaround was as you outlined above, we register the components manually (although we've discussed making our own auto-loader) and then in the page component we call the registered one. You're right in the fact that some components do…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pixelpeter
Comment options

Answer selected by pixelpeter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants