本文整理匯總了PHP中UploadFile::move方法的典型用法代碼示例。如果您正苦於以下問題:PHP UploadFile::move方法的具體用法?PHP UploadFile::move怎麽用?PHP UploadFile::move使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UploadFile
的用法示例。
在下文中一共展示了UploadFile::move方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: save
/**
* 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);
}
示例2: move
public function move(UploadFile $file)
{
$file->move($this->baseDir, $this->name);
Image::make($this->path)->fit(200)->save($this->thumbnail_path);
return $this;
}
示例3: __storeImagePost
/**
* 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;
}