Laravel 5.6中的通知

时间:2018-09-14 04:46:01

标签: laravel-5.6

在laravel中,我试图向用户发送4种不同类型的通知。这是我的代码部分。

            <div class="panel-body">
                <ul class="nav" role="tablist">
                    <li role="presentation">
                        <a href="{{ url('/approvals/capexapproval') }}">
                            CAPEX
                            @if(Auth::user()->unreadNotifications->count()>0)
                  <span class="badge badge-light">
                  {{count(Auth::user()->unreadNotifications)}}
                  </span>
                @endif
              </a>
            </li>


                    <li role="presentation">
                        <a href="{{ url('/approvals/creditapproval') }}">
                            CUSTOMER
                            @if(Auth::user()->unreadNotifications->count()>0)
                 <span class="badge badge-light">
                 {{count(Auth::user()->unreadNotifications)}}
                 </span>
                 @endif
               </a>
             </li>

                    <li role="presentation">
                        <a href="{{ url('/approvals/vendorapproval') }}">
                            VENDOR
                            @if(Auth::user()->unreadNotifications->count()>0)
                 <span class="badge badge-light">
                   {{count(Auth::user()->unreadNotifications)}}
                  </span>
                @endif
               </a>
              </li>

                

对于每个菜单,我需要显示收到的邮件数,如果我阅读特定收件箱的邮件,则该特定收件箱的未读通知计数应减少1。

0 个答案:

没有答案