/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $resident = Resident::findOrFail($id); $xiaoqus = Xiaoqu::all(['id', 'title']); $xiaoqu_id = $resident->xiaoqu_id; return view('resident.edit', compact('resident', 'xiaoqus', 'xiaoqu_id'), ['pageHeaderText' => '住户管理', 'panelHeadingText' => '更改住户信息', 'contentType' => 'residents']); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $xiaoqus = Xiaoqu::all(); return view('xiaoqu.index', compact('xiaoqus'), ['pageHeaderText' => '小区管理', 'panelHeadingText' => '小区列表', 'contentType' => 'xiaoqus']); }