vue Blog 学习笔记 (3) Notification通知

2017-10-25  本文已影响0人  邱杉的博客
@if(Auth::guest())
  <comment title="评论"
    commentable-type="articles"
    commentable-id="{{ $article->id }}"></comment>
@else
     <comment title="评论"
       username="{{ Auth::user()->name }}"
       user-avatar="{{ Auth::user()->avatar }}"
       commentable-type="articles"
       commentable-id="{{ $article->id }}"
       can-comment></comment>
@endif

<comment></comment> 该标签是如何处理的哩?
resources/assets/js/home.js
Vue.component('comment', require('components/Comment.vue'))

User 模型
use Illuminate\Notifications\Notifiable;
trait Notifiable
{
use HasDatabaseNotifications, RoutesNotifications;
}

Laravel Notifications

上一篇 下一篇

猜你喜欢

热点阅读