예제 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Image $image, ImageRequest $request)
 {
     //
     $input = $request->all();
     $image->update($input);
     return redirect('imagenes');
 }
예제 #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param ImageRequest $request
  * @param Project $project
  * @param Module $module
  * @param Page $page
  * @param Image $image
  * @return \Illuminate\Http\Response
  */
 public function update(ImageRequest $request, Project $project, Module $module, Page $page, Image $image)
 {
     $image->update($request->all());
     if (Input::file('model_file')) {
         $file = Input::file('model_file');
         $file->move('uploads/models', $file->getClientOriginalName());
         $image->model_file = $file->getClientOriginalName();
     }
     $image->save();
     return redirect()->route('project.module.page.show', [$project, $module, $page]);
 }
예제 #3
0
 public function update(Image $image, ImageRequest $request)
 {
     $image->update($request->all());
     return redirect('images');
 }
예제 #4
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, Image $image)
 {
     $image->update($request->except('_method', '_token', 'artist_list', 'piece_list'));
     $pieces = count($request->input('piece_list')) ? $request->input('piece_list') : [];
     $artists = count($request->input('artist_list')) ? $request->input('artist_list') : [];
     $image->pieces()->sync($pieces);
     $image->artists()->sync($artists);
     return redirect()->route('admin.images.show', $image->id)->with('message', 'Image updated');
 }