美文网首页
vue Blog 学习笔记 (3) Notification通知

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

作者: 邱杉的博客 | 来源:发表于2017-10-25 17:47 被阅读0次
  • resources/views/article/show.blade.php
@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

相关文章

网友评论

      本文标题:vue Blog 学习笔记 (3) Notification通知

      本文链接:https://www.haomeiwen.com/subject/avfcpxtx.html