Hey @Stormlight,
The Waterhole project skeleton is really just a slightly stripped-down version of the Laravel 10 skeleton (no Vite, no API routes, etc.) with some default configuration in place – use the Waterhole User model for auth, and add a service provider for Waterhole customizations.
Whether you start with the Laravel skeleton and pull in Waterhole, or start with the Waterhole skeleton and pull in things from the Laravel skeleton as needed, you'll end up at pretty much the same place. So do whatever you're most comfortable with
As you've discovered, you can build new pages within the Waterhole layout using the <x-waterhole::layout>
component, or if you just want the CSS (and not the layout) you can use <x-waterhole::html>
. A list of all Waterhole components is available in the class reference.
See here for Laravel 11 discussion - we'll stay on top of future Laravel releases relatively quickly.
Thanks for clarifying that @Toby! I had two more questions:
How can we implement conditional rendering of components based on the route. In my case, I’m trying to remove the ‘search’ component from the Header on any routes that aren’t prefixed with “/forums” (my waterhole path is set to "forums").I don’t think we can access routes in a ServiceProvider (nor is it good practice?) since that’s what’s bootstrapping the application, though I might be mistaken. In normal situations, we would have this conditional in our blade template files. However, I don’t think we have access to modify the Waterhole blade template files (unless I missed something in the Waterhole docs).See my response in the post below for the solution.
resolveRelationUsing
method. However, the Laravel docs mention that this is not recommended for normal application development. Is it then better to just create another User model and extend theWaterhole\Models\User
class?