/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $types = Image_type::all(); $image = Image::find($id); //todo show error on false id return view('image.edit', ['types' => $types, 'image' => $image]); }