/**
  * Process the form.
  * @return void
  */
 public function save()
 {
     $photo = $this->flyer->addPhoto($this->makePhoto());
     $this->file->move($photo->baseDir(), $photo->name);
     $this->thumbnail->make($photo->path, $photo->thumbnail_path);
 }
Beispiel #2
0
 public function move(UploadFile $file)
 {
     $file->move($this->baseDir, $this->name);
     Image::make($this->path)->fit(200)->save($this->thumbnail_path);
     return $this;
 }
 /**
  * Store image of post
  * @param  UploadFile $imagesFile
  * @return string  [new name image]
  */
 private function __storeImagePost($imagesFile)
 {
     $nameImage = $imagesFile->getClientOriginalName();
     $extensionImage = $imagesFile->getClientOriginalExtension();
     $newNameImage = sha1($nameImage) . time() . "." . $extensionImage;
     $desPath = public_path() . config('model.posts.path_folder_photo_post');
     $imagesFile->move($desPath, $newNameImage);
     return $newNameImage;
 }