In this episode, we take a fresh Laravel Breeze setup and start tweaking it to feel more like a real app, rather than just the default starter. Out of the box, Breeze gives us two layouts—one for authenticated users (like the dashboard) and another for unauthenticated users (like login and register pages).
We begin by replacing the default welcome page route with a controller action, setting up a new home controller to handle the homepage. Next, we copy over the dashboard layout to serve as the new homepage view, giving it a more "app"-like feel with navigation links up top.
From there, we encounter an issue: when logged out, the app tries to access user info that's not available (because we're not logged in)—so we use Blade's auth
and guest
directives to conditionally show or hide navigation elements based on the user's authentication state. This means only logged-in users see the settings drop-down, while guests get links to log in or register.
We also spruce up the navigation, adding links for signing in and creating an account, and clean up the layout with some quick Tailwind tweaks. Plus, we update the main navigation and logo to correctly route users to the right pages depending on their state.
By the end, we have a much more polished, user-friendly starting point that makes it easy to continue building out our app—whether the user is signed in or not!