select('id', 'category', 'pinned', 'title', 'created_at') ->orderByDesc('pinned') ->orderByDesc('created_at') ->paginate(3); $categories = Information::CATEGORIES; if (Auth::check()) { return view('home')->with(compact('informations', 'categories')); } else { return view('guest')->with(compact('informations', 'categories')); } } }