diff --git a/src/HasProfilePhoto.php b/src/HasProfilePhoto.php index dd885f530..117435957 100644 --- a/src/HasProfilePhoto.php +++ b/src/HasProfilePhoto.php @@ -17,7 +17,7 @@ public function updateProfilePhoto(UploadedFile $photo) { tap($this->profile_photo_path, function ($previous) use ($photo) { $this->forceFill([ - 'profile_photo_path' => $photo->store( + 'profile_photo_path' => $photo->storePublicly( 'profile-photos', $this->profilePhotoDisk() ), ])->save(); @@ -57,6 +57,6 @@ protected function defaultProfilePhotoUrl() */ protected function profilePhotoDisk() { - return 'public'; + return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : 'public'; } }