Exemplo n.º 1
0
                <a  class="secondary-content badge" v-bind:class="{ 'blue lighten-2': notificacion.leido == '1'}" v-on:click="toggle(notificacion)" href="#!">
                    <i class="fa fa-lg" v-bind:class="{ 'fa-bell-o': notificacion.leido, 'fa-bell': !notificacion.leido}"></i>
                    @{{notificacion.leido ?  'Marcar como no leido' : 'Marcar como leido'}}
                </a>
                <p> <b>@{{notificacion.titulo}}</b> | @{{ notificacion.mensaje }}  <br>
                    <i class="right">@{{  notificacion.created_at | fromNow | capitaiize }}</i>
                </p>
            </li>
        </ul>
        <div v-if="!notificaciones.length" class="no-content center fadeinleft">
            <img src="{{asset('images/logo-happy.png')}}" alt="Sin Notificaciones" style="width:30%; -webkit-filter: grayscale(100%); filter: grayscale(100%);" />
            <h3 class="grey-text">No tienes notificaciones</h3>
        </div>
        {{$notificaciones->links()}}
        <a class="btn btn-link btn-large right" href="<?php 
echo Pushpad\Pushpad::path_for(Auth::user()->id);
?>
">Suscribirse a notificaciones</a>
    </div>

    <script src="{{asset('js/vue.min.js')}}"></script>
    <script src="{{asset('js/moment.min.js')}}"></script>
    <script>
    moment.locale("es");
    $.ajaxSetup({
        headers: { 'Auth-Token': "{{ Crypt::encrypt(Auth::user()->id) }}" }
    });


    var Vue = new Vue({
        el: '#notificaciones',