/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { if ($movie = Movie::find($id)) { $genres = Genre::get()->toArray(); return view('movies.edit')->with('movie', $movie)->with('genres', $genres); } // User doesn't exist for this account $this->setMessage('Movie not found!', 'error'); return redirect('/movies'); }