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