非公開ユーザの考慮漏れ

This commit is contained in:
shibafu 2018-01-07 22:42:30 +09:00
parent eb1884200b
commit efd5eab5e6

View File

@ -36,9 +36,13 @@ class HomeController extends Controller
if (Auth::check()) { if (Auth::check()) {
// お惣菜コーナー用のデータ取得 // お惣菜コーナー用のデータ取得
$publicLinkedEjaculations = Ejaculation::where('is_private', false) $publicLinkedEjaculations = Ejaculation::join('users', 'users.id', '=', 'ejaculations.user_id')
->where('link', '<>', '') ->where('users.is_protected', false)
->orderBy('ejaculated_date', 'desc') ->where('ejaculations.is_private', false)
->where('ejaculations.link', '<>', '')
->orderBy('ejaculations.ejaculated_date', 'desc')
->select('ejaculations.*')
->with('user')
->take(5) ->take(5)
->get(); ->get();