namespace IlluminateHttp;
use IlluminateSupportTraitsMacroable;
use SymfonyComponentHttpFoundationFileUploadedFile as SymfonyUploadedFile;
// more name space and trait
class UploadedFile extends SymfonyUploadedFile
{
use Macroable;// use trait
public function path()
{
return $this->getRealPath();
}// get path ,then use the real path
public function extension()
{
return $this->guessClientExtension();
}// get extension
public function hashName()
{
return md5_file($this->path()).'.'.$this->extension();// md5_file
}//Get a filename for the file that is the MD5 hash of the contents.
// get a type of the md5 about file
public static function createFrombase(SymfonyUploadedFile $file)
{
return $file instanceof static ? $file : new static(
$file->getPathname(), $file->getClientOriginalName(), $file->getClientMimeType(),
$file->getClientSize(), $file->getError()
);// return $file
// to long
}// Create a new file instance from a base instance.
}



