- $book = $this->entityRepo->updateFromInput('book', $book, $request->all());
- Activity::add($book, 'book_update', $book->id);
- return redirect($book->getUrl());
+
+ $input = $request->file('image')->getClientOriginalName();
+ echo $input;
+ $destinationPath = public_path('uploads/book/');
+ $request->file('image')->move($destinationPath, $input);
+ $path = baseUrl('/uploads/book/').'/'.$input;
+ $book = $this->entityRepo->updateFromInput('book', $book, $request->all());
+ $book->image = $path;
+ $book->save();
+ Activity::add($book, 'book_update', $book->id);
+ return redirect($book->getUrl());