Merge pull request #181 from shikorism/fix/private-like
非公開チェックインに対するいいね関係のバグ修正
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user