示例#1
0
 public function postCreatePhoto(CreatePhotoRequest $request)
 {
     $image = $request->file('image');
     $id = $request->get('id');
     Photo::create(['title' => $request->get('title'), 'description' => $request->get('description'), 'path' => $this->createImage($image), 'album_id' => $id]);
     return redirect("validated/photos?id={$id}")->with(['photo_created' => 'The photo has been created']);
 }