Don't forget to look over the examples page at bootstrap https://getbootstrap.com/docs/4.1/examples/
Also tutorials at https://www.w3schools.com/bootstrap4/
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I'm still trying to learn some of the basics here. I'm building a site and I want the user to get a sidebar to appear when they go to a certain page. I'm using the basic Laravel template after doing
php artisan ui bootstrap --auth
Here's the code inside the layout/app.blade.php file. I basically took the nav bar that's included with --auth command and put it into a separate view and added the header tag, but I'm not even sure what that is for anyway.
<body>
<header id="header" class="border-left">
<div id="app">
@include('layouts/nav')
<main class="py-4">
<div class="container">
@yield('content')
</div>
</main>
</div>
</header>
</body>
I'm copying templates from the interwebs and I don't really know what any of this stuff means because I've never really worked with HTML. I'm slowly picking it up as I go along. Lately I'm stuck. I can't seem to find an easy enough template that has both a static nav bar and a sidebar.
A perfect example of what I'm trying to setup is this discussion area. It's got the nav bar on top and and a nice little sidebar. I tried inspecting the code, but I can't seem to find the magic sauce that would let me incorporate the same thing into my site. Every time I try putting a sidebar in I either get it on top and pushing down the nav bar or I get under, but pushing the rest of my content over.
Don't forget to look over the examples page at bootstrap https://getbootstrap.com/docs/4.1/examples/
Also tutorials at https://www.w3schools.com/bootstrap4/
Please or to participate in this conversation.