select('id', 'category', 'pinned', 'title', 'created_at') ->orderByDesc('pinned') ->orderByDesc('created_at') ->take(3) ->get(); $categories = Information::CATEGORIES; if (Auth::check()) { // お惣菜コーナー用のデータ取得 $publicLinkedEjaculations = Ejaculation::join('users', 'users.id', '=', 'ejaculations.user_id') ->where('users.is_protected', false) ->where('ejaculations.is_private', false) ->where('ejaculations.link', '<>', '') ->orderBy('ejaculations.ejaculated_date', 'desc') ->select('ejaculations.*') ->with('user', 'tags') ->take(5) ->get(); return view('home')->with(compact('informations', 'categories', 'publicLinkedEjaculations')); } else { return view('guest')->with(compact('informations', 'categories')); } } }