laravel-learn-bbs/resources/views/users/_replies.blade.php

27 lines
820 B
PHP
Raw Permalink Normal View History

2018-01-15 15:24:11 +00:00
@if (count($replies))
<ul class="list-group">
@foreach ($replies as $reply)
<li class="list-group-item">
<a href="{{ $reply->topic->link(['#reply' . $reply->id]) }}">
{{ $reply->topic->title }}
</a>
<div class="reply-content" style="margin: 6px 0;">
{!! $reply->content !!}
</div>
<div class="meta">
<span class="glyphicon glyphicon-time" aria-hidden="true"></span>
回复于 {{ $reply->created_at->diffForHumans() }}
</div>
</li>
@endforeach
</ul>
@else
<div class="empty-block">暂无数据 ~_~</div>
@endif
{{-- 分页 --}}
{!! $replies->appends(Request::except('page'))->render() !!}