select('id', 'category', 'pinned', 'title', 'created_at') ->orderByDesc('pinned') ->orderByDesc('created_at') ->paginate(20); return view('admin.info.index')->with([ 'informations' => $informations, 'categories' => Information::CATEGORIES ]); } public function create() { // TODO } public function edit($id) { $information = Information::findOrFail($id); return view('admin.info.edit')->with([ 'info' => $information, 'categories' => Information::CATEGORIES ]); } public function update(Request $request) { // TODO } }