This commit is contained in:
2025-05-27 20:17:05 +05:30
4 changed files with 9 additions and 12 deletions

View File

@@ -765,7 +765,7 @@ class UsersController extends Controller
{
try {
$validator = Validator::make($request->all(), [
'email' => 'required|email'
'email' => 'required'
]);
if ($validator->fails()) {

View File

@@ -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],
);
}

View File

@@ -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>

View File

@@ -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');