/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $widget = $this->widget->findOrFail($id); $pages = Page::lists('title', 'id')->toArray(); return view('berrier::admin.widgets.edit')->with(compact('pages'))->with(compact('widget')); }