Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
default image upload on registration
Browse files Browse the repository at this point in the history
  • Loading branch information
marky291 committed Jun 3, 2019
1 parent 0ee5e5e commit ae2dbfa
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected function validator(array $data)
'username' => ['required', 'string', 'min:5', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:6', 'confirmed'],
'avatarUrl' => ['string'],
]);
}

Expand All @@ -70,6 +71,7 @@ protected function create(array $data)
'username' => $data['username'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
'avatarUrl' => $data['avatarUrl'],
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function up()
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->longText('avatarUrl')->nullable();
$table->longText('avatarUrl');
$table->rememberToken();
$table->timestamps();
});
Expand Down
Binary file added public/img/preset/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16021,7 +16021,8 @@ __webpack_require__.r(__webpack_exports__);
username: '',
email: '',
password: '',
password_confirmation: ''
password_confirmation: '',
avatarUrl: 'http://www.gravatar.com/avatar/c2d52abc9f91d455e15a48d59fecd746?s=100&d=https%3A%2F%2Fs3.amazonaws.com%2Flaracasts%2Fimages%2Fdefault-square-avatar.jpg'
})
};
},
Expand Down
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=1f71ca9d5d4b1a6077f9",
"/js/app.js": "/js/app.js?id=e2cfe3a893f2cd20a059",
"/css/app.css": "/css/app.css?id=3903f9404b68e9b6a947"
}
1 change: 1 addition & 0 deletions resources/js/components/RegisterComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
email: '',
password: '',
password_confirmation: '',
avatarUrl: 'http://www.gravatar.com/avatar/c2d52abc9f91d455e15a48d59fecd746?s=100&d=https%3A%2F%2Fs3.amazonaws.com%2Flaracasts%2Fimages%2Fdefault-square-avatar.jpg',
})
}
},
Expand Down
2 changes: 1 addition & 1 deletion resources/views/account/notifications.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@foreach ($notifications as $notification)
<account-notification-component id="{{ $notification->getKey() }}" status="{{ $notification->read() }}" inline-template>
<div class="notification tw-py-4 tw-px-4 tw-rounded shadow-sm tw-border tw-mb-2 tw-flex">
<div class="notification tw-bg-white tw-py-4 tw-px-4 tw-rounded tw-shadow tw-border tw-mb-2 tw-flex">
<div class="">
<img v-if="!read" src="/img/icons/icon_status_mail_unread.png" alt="">
<img v-if="read" src="/img/icons/icon_status_mail_read.png" alt="">
Expand Down

0 comments on commit ae2dbfa

Please sign in to comment.