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

davy_yg's avatar
Level 27

Flash Session Styling

Hello,

I am using flash session styling and hoping my flash session message has a style on it.

@if (Session::has('flash'))
<div class="alert alert-primary">
    <ul>
    {{ Session::get('flash') }}
    </ul>
</div>      
@endif

The message works fine except that there is no styling. I wonder where the styling css comes from?

I already add bootstrap link on top of it :

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

Still there is no styling just plain text. Any clue?

0 likes
3 replies
rin4ik's avatar
<div class="alert alert-success">
davy_yg's avatar
Level 27

Thanks it works!

Still wonder why the :

does not works. Since it works on other website.

rin4ik's avatar
rin4ik
Best Answer
Level 50

because it is bootstrap 4.0 class. bootstrap 3.7 doesn't support alert-primary

Please or to participate in this conversation.