Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Flyawayx's avatar

Bootstrap panel don't work

<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">{{ $tour->name }}</h3>
            </div>

            <div class="panel-body">
                <h2>Description: {{ $tour->description }}</h2>
                <h2>Price: {{ $tour->price }}</h2>
                <h2>Region: {{ $tour->region }}</h2>
                <h2>Stars: {{ $tour->stars }}</h2>
                <h2>Start date: {{  $tour->start_date }}</h2>
                <h2>End date: {{ $tour->end_date }}</h2>
            </div>
        </div>
        <a href="{{ route('tours.edit', $tour->id) }}" class="btn btn-block btn-success">Edit</a>
        <a href="{{ route('tours.destroy', $tour->id) }}" class="btn btn-block btn-danger">Delete</a>
    </div>
</div>

Why in Laravel 5.6 don't apply bootstrap styles for panel component?

0 likes
6 replies
lostdreamer_nl's avatar
Level 53

are you including bootstrap3 in your layout?

Laravel 5.6 now ships with Bootstrap 4 by default, and Bootstrap 4 does not have panels. https://getbootstrap.com/docs/4.0/migration/#panels

"Panels, thumbnails, and wells Dropped entirely for the new card component."

Panels

  • .panel to .card, now built with flexbox.
  • .panel-default removed and no replacement.
  • .panel-group removed and no replacement. .card-group is not a replacement, it is different.
  • .panel-heading to .card-header
  • .panel-title to .card-title. Depending on the desired look, you may also want to use heading elements or classes (e.g. <h3>, .h3) or bold elements or classes (e.g. <strong>, <b>, .font-weight-bold). Note that .card-title, while similarly named, produces a different look than .panel-title.
  • .panel-body to .card-body
  • .panel-footer to .card-footer
  • .panel-primary, .panel-success, .panel-info, .panel-warning, and .panel-danger have been dropped for .bg-, .text-, and .border utilities generated from our $theme-colors Sass map.
1 like
lara56278's avatar

Laravel 5.6 comes out of the box with the default Boootstrap version being the newest one, which is 4.1.

Panels have been replaced by the Card module in the newest version of Bootstrap so using panel won't result in anything happening unless of course you have your own custom 'panel' class.

So you can either down grade back to Bootstrap 3, or you can jump into Bootstrap 4 starting here:

https://getbootstrap.com/docs/4.1/getting-started/introduction/

Of course you can always use something else like Tailwind or Bulma if that works better for you. Cheers!

lostdreamer_nl's avatar

@rin4ik Because as I posted it, I remembered about Bootstrap 4 coming out, so went to the migration docs to copy paste the correct part ;)

Please or to participate in this conversation.