File::move PHP Method

move() public static method

Move a file to a new location.
public static move ( string $path, string $target ) : boolean
$path string
$target string
return boolean
        public static function move($path, $target)
        {
            return \Illuminate\Filesystem\Filesystem::move($path, $target);
        }

Usage Example

Exemplo n.º 1
0
 public static function uploadFileToStorage(File $file)
 {
     $filename = 'file_' . substr(md5(uniqid(rand())), 6) . '_' . $file->getClientOriginalName();
     $path = self::uploadPath();
     $file->move($path, $filename);
     return $path . DIRECTORY_SEPARATOR . $filename;
 }
All Usage Examples Of File::move