PHP Classes

File: resources/views/partials/_alert.blade.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   Heloise Laravel Blog Package   resources/views/partials/_alert.blade.php   Download  
File: resources/views/partials/_alert.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Heloise Laravel Blog Package
Simple blog system with comments and RSS feed
Author: By
Last change:
Date: 7 months ago
Size: 467 bytes
 

Contents

Class file image Download
@foreach (['alert-success' => 'success', 'alert-danger' => 'error'] as $cssClass => $sessName)
    @if (session($sessName))
        <div class="row col col-md-6">
            <p class="alert {{ $cssClass }}" role="alert">
                {{ session($sessName) }}
            </p>
        </div>
    @endif
@endforeach

<script>
    $(function() {
        if ($('div[role=alert]').length) {
            $('div[role=alert]').fadeOut(10000);
        }
    });
</script>