The alert doesn't show up in Laravel 5

Posted 2 years ago by ronit5rg

This is my alert.blade.php,

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

And this is my welcome.blade.php,

<!DOCTYPE html>
<html>
    <head>
        <title>Laravel</title>

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"     integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"     crossorigin="anonymous">

    </head>
    <body>
        @include('alert')
    </body>
</html>

And, here's my routes.php,

Route::get('/', function () {
    return view('welcome')->with('info','Hello World');
});

Any help will be really appreciated. Thanks in advance

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.