public function update(Request $request, $id) { $this->wish = Wish::find($id); $this->wish->fill($request->all()); if (Input::hasFile('picture')) { File::delete(public_path('img/wishes/') . $this->wish->picture); $this->wish->picture = $this->uploadImage(Input::file('picture')); } $this->wish->url = Parent::addScheme($request->url); $this->wish->save(); return redirect()->route('wishes.index'); }