PHP Classes

File: src/stubs/cms/core/layout/resources/views/site/notifications.blade.php

Recommend this page to a friend!
  Classes of Shun Ram   Laravel Admin   src/stubs/cms/core/layout/resources/views/site/notifications.blade.php   Download  
File: src/stubs/cms/core/layout/resources/views/site/notifications.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel Admin
Manage users and the site content they publish
Author: By
Last change:
Date: 1 year ago
Size: 1,198 bytes
 

Contents

Class file image Download
<!-- PNotify -->
{!!Cms::style('theme/vendors/pnotify/dist/pnotify.css')!!}
{!!Cms::style('theme/vendors/pnotify/dist/pnotify.buttons.css')!!}
{!! Cms::script('theme/vendors/pnotify/dist/pnotify.js') !!}
{!! Cms::script('theme/vendors/pnotify/dist/pnotify.buttons.js') !!}

<!---------NOTIFICATIONS--------->
<script>
    $('document').ready(function() {
        function notify(title,text,type,hide) {
            new PNotify({
                title: title,
                text: text,
                type: type,
                hide: hide,
                styling: 'bootstrap3'
            })
        }
        @if(Session::has("success"))
            notify('Success','{{Session::get("success")}}','success',true);
        @endif
        @if(Session::has("error"))
            notify('Error','{{Session::get("error")}}','error',true);
        @endif
        @if(Session::has("info"))
            notify('Info','{{Session::get("info")}}','info',true);
        @endif

        @if(count((array) $errors) > 0)
        @foreach ($errors->all() as $error)
            notify('Error','{{$error}}','error',true);
        @endforeach
        @endif

    });
</script>