Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit c2ed405

Browse files
authored
feat: upload error localization key (#47)
1 parent 72a92b4 commit c2ed405

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

resources/lang/en/forms.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@
4848
'upload-avatar' => [
4949
'upload_avatar' => 'Upload Avatar',
5050
'delete_avatar' => 'Delete Avatar',
51+
'upload_error' => 'Uploading error. Image size may not be greater than 2048 kilobytes and must be of type jpeg, png or svg.',
5152
],
5253
];

src/Components/UpdateProfilePhotoForm.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ class UpdateProfilePhotoForm extends Component
1313
use InteractsWithUser;
1414
use UploadImageSingle;
1515

16-
/**
17-
* Render the component.
18-
*
19-
* @return \Illuminate\View\View
20-
*/
21-
public function render()
16+
public function render(): \Illuminate\View\View
2217
{
2318
return view('ark-fortify::profile.update-profile-photo-form');
2419
}
2520

26-
public function updatedImageSingle()
21+
public function updatedImageSingle(): void
2722
{
2823
$this->validate([
2924
'imageSingle' => $this->imageSingleValidators(),
@@ -35,7 +30,7 @@ public function updatedImageSingle()
3530
$this->user->refresh();
3631
}
3732

38-
public function deleteImageSingle()
33+
public function deleteImageSingle(): void
3934
{
4035
$this->user->getFirstMedia('photo')->delete();
4136
$this->user->refresh();

0 commit comments

Comments
 (0)