public static function requestImage(UploadedFile $file) { $photo = new static(); $Imagename = time() . $file->getClientOriginalName(); // Gives the file its name $userfilepath = $UserData->getUsername(); // Get current username to define directory $holder = Storage::disk('userPhotos')->put($userfilepath . '/' . $Imagename, ''); // Prep Image for disk on folder return $photo; }
public static function named(UploadedFile $file) { return (new static())->saveAs($file->getClientOriginalName()); }