{{ Session::get('success') }}
This just echos the session variable 'success'. So when you use
{{ Session::get('success') }}
@if($success)
<div class="alert-box success">
<h2>{{ $success }}</h2>
</div>
@endif
you are seeing it's output along with the error of the next statement. Because with() function only sets the value in Session and will not set as a variable. Hence @if($success)
will result in undefined variable error.
As @Andreyco said,
@if(Session::has('success'))
<div class="alert-box success">
<h2>{{ Session::get('success') }}</h2>
</div>
@endif
This should work.
The reason you are not seeing it might be because the action you are performing is not success. And this does not require you to either reinstall xampp or modify php.ini.