Example #1
0
 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;
 }
Example #2
0
 public static function named(UploadedFile $file)
 {
     return (new static())->saveAs($file->getClientOriginalName());
 }