commit
ed295cb7bc
@ -188,6 +188,10 @@ SQL
|
||||
$likes = $user->likes()
|
||||
->orderBy('created_at', 'desc')
|
||||
->with('ejaculation.user', 'ejaculation.tags')
|
||||
->whereHas('ejaculation', function ($query) {
|
||||
$query->where('user_id', Auth::id())
|
||||
->orWhere('is_private', false);
|
||||
})
|
||||
->paginate(20);
|
||||
|
||||
return view('user.likes')->with(compact('user', 'likes'));
|
||||
|
@ -6,8 +6,11 @@
|
||||
</h5>
|
||||
</div>
|
||||
<!-- tags -->
|
||||
@if ($ejaculation->tags->isNotEmpty())
|
||||
@if ($ejaculation->is_private || $ejaculation->tags->isNotEmpty())
|
||||
<p class="mb-2">
|
||||
@if ($ejaculation->is_private)
|
||||
<span class="badge badge-warning"><span class="oi oi-lock-locked"></span> 非公開</span>
|
||||
@endif
|
||||
@foreach ($ejaculation->tags as $tag)
|
||||
<a class="badge badge-secondary" href="{{ route('search', ['q' => $tag->name]) }}"><span class="oi oi-tag"></span> {{ $tag->name }}</a>
|
||||
@endforeach
|
||||
|
Loading…
Reference in New Issue
Block a user