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: Add Support for Full-Page Components #64

Closed
KenKodz opened this issue Sep 14, 2020 · 3 comments
Closed

Feature Request: Add Support for Full-Page Components #64

KenKodz opened this issue Sep 14, 2020 · 3 comments

Comments

@KenKodz
Copy link
Contributor

KenKodz commented Sep 14, 2020

I'd like to be able to be able to do this: "If the main content of a page is a Livewire component, you can pass the component directly into a Laravel route as if it were a controller."

I've worked on this myself and was able to easily add ->layout() both with and without parameters to the package. However, I got stuck when trying to implement ->slot(). I'm sure it's a simple thing that I am overlooking. I've just currently run out of time to work on it for now. I'll come back to it when I have more time if no one else figures it out first.

Maybe I'm the only one who wants this. I just thought it'd be a good feature.

@KenKodz
Copy link
Contributor Author

KenKodz commented Sep 19, 2020

I think that issue I had with getting the ->slot() to work was fixed the same day I created this feature request. Livewire pull request 1588

I'll test my code again this weekend and submit a pull request if it works.

@rappasoft
Copy link
Owner

Ok sounds good!

@KenKodz
Copy link
Contributor Author

KenKodz commented Sep 19, 2020

After some testing, I came to the conclusion that the best way to support the 4 livewire macros is to just override the render method of the TableComponent and then the 4 macros are automatically available.

However, it did occur to me that the "solution" would be to have an artisan make command that stubs out an example TableComponent. Of course it would have to "register" itself as a Livewire component too. Just an idea.

Either way, I'm just going to close out the issue since technically speaking the requested functionality already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants