forget password
This commit is contained in:
@@ -765,7 +765,7 @@ class UsersController extends Controller
|
||||
{
|
||||
try {
|
||||
$validator = Validator::make($request->all(), [
|
||||
'email' => 'required|email'
|
||||
'email' => 'required'
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
||||
@@ -12,21 +12,17 @@ use Illuminate\Queue\SerializesModels;
|
||||
class UserLink extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
public $mailData;
|
||||
|
||||
public $mailData;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct($mailData)
|
||||
|
||||
public function __construct($mailData)
|
||||
{
|
||||
|
||||
$this->mailData = $mailData;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*/
|
||||
@@ -43,7 +39,8 @@ class UserLink extends Mailable
|
||||
public function content(): Content
|
||||
{
|
||||
return new Content(
|
||||
view: 'view.user_update_password',
|
||||
view: 'Mails.user_update_password',
|
||||
with: ['mailData' => $this->mailData],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<title>Update Your Password</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, {{ $user['name'] }}!</h1>
|
||||
<h1>Hello, {{ $mailData['name'] }}!</h1>
|
||||
|
||||
<p>We received a request to update the password for your account.</p>
|
||||
|
||||
<p>If you made this request, you can update your password using the link below:</p>
|
||||
|
||||
<p>
|
||||
<a href=" http://vib360.betadelivery.com/forget-password/{{$user['user_id'] }}"
|
||||
<a href=" http://vib360.betadelivery.com/forget-password/{{$mailData['user_id'] }}"
|
||||
style="display: inline-block; padding: 10px 20px; color: #fff; background-color: #007bff; text-decoration: none; border-radius: 5px;">
|
||||
Update Password
|
||||
</a>
|
||||
|
||||
@@ -69,6 +69,6 @@ Route::middleware(['customerApiBasicAuth'])->group(function () {
|
||||
});
|
||||
|
||||
// user password update
|
||||
Route::get('/user-password-update-link', [UsersController::class, 'userEmailCheck']);
|
||||
Route::post('/user-password-update-link', [UsersController::class, 'userEmailCheck']);
|
||||
Route::post('/user-password-update', [UsersController::class, 'userUpdatePassword'])->name('user.password.update');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user