feat: email verification sent with resent.com
This commit is contained in:
@@ -141,8 +141,8 @@ public function verifyEmailCode(Request $request)
|
|||||||
|
|
||||||
// Delete verification record
|
// Delete verification record
|
||||||
\DB::table('email_verifications')->where('id', $record->id)->delete();
|
\DB::table('email_verifications')->where('id', $record->id)->delete();
|
||||||
|
$token = $user->createToken('token', $user->is_admin ? ['admin'] : ['user'])->plainTextToken;
|
||||||
return response()->json(['message' => 'Email verified successfully']);
|
return response()->json(['message' => 'Email verified successfully', 'token' => $token]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loginOTP(Request $request)
|
public function loginOTP(Request $request)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"laravel/tinker": "^2.10.1",
|
"laravel/tinker": "^2.10.1",
|
||||||
"masbug/flysystem-google-drive-ext": "^2.4",
|
"masbug/flysystem-google-drive-ext": "^2.4",
|
||||||
"predis/predis": "^2.3",
|
"predis/predis": "^2.3",
|
||||||
|
"resend/resend-laravel": "^0.21.0",
|
||||||
"spatie/laravel-backup": "^9.2",
|
"spatie/laravel-backup": "^9.2",
|
||||||
"tucker-eric/eloquentfilter": "^3.5"
|
"tucker-eric/eloquentfilter": "^3.5"
|
||||||
},
|
},
|
||||||
|
|||||||
Generated
+127
-1
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "42dd77e9fe0ce2302eb093764611bad0",
|
"content-hash": "b2928ef8514c9c8819a75d8ef288dcb2",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@@ -4207,6 +4207,132 @@
|
|||||||
],
|
],
|
||||||
"time": "2024-04-27T21:32:50+00:00"
|
"time": "2024-04-27T21:32:50+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "resend/resend-laravel",
|
||||||
|
"version": "v0.21.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/resend/resend-laravel.git",
|
||||||
|
"reference": "72deb3fe044a5a0e68e220d86908eeaaa8ecf5db"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/resend/resend-laravel/zipball/72deb3fe044a5a0e68e220d86908eeaaa8ecf5db",
|
||||||
|
"reference": "72deb3fe044a5a0e68e220d86908eeaaa8ecf5db",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/http": "^10.0|^11.0|^12.0",
|
||||||
|
"illuminate/support": "^10.0|^11.0|^12.0",
|
||||||
|
"php": "^8.1",
|
||||||
|
"resend/resend-php": "^0.19.0",
|
||||||
|
"symfony/mailer": "^6.2|^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.14",
|
||||||
|
"mockery/mockery": "^1.5",
|
||||||
|
"orchestra/testbench": "^8.17|^9.0|^10.0",
|
||||||
|
"pestphp/pest": "^2.0|^3.7"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Resend\\Laravel\\ResendServiceProvider"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Resend\\Laravel\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Resend and contributors",
|
||||||
|
"homepage": "https://github.com/resend/resend-laravel/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Resend for Laravel",
|
||||||
|
"homepage": "https://resend.com/",
|
||||||
|
"keywords": [
|
||||||
|
"api",
|
||||||
|
"client",
|
||||||
|
"laravel",
|
||||||
|
"php",
|
||||||
|
"resend",
|
||||||
|
"sdk"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/resend/resend-laravel/issues",
|
||||||
|
"source": "https://github.com/resend/resend-laravel/tree/v0.21.0"
|
||||||
|
},
|
||||||
|
"time": "2025-08-13T04:57:39+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "resend/resend-php",
|
||||||
|
"version": "v0.19.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/resend/resend-php.git",
|
||||||
|
"reference": "b2fc34593c7b8ff7b202f3fcc20f33ce55dde424"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/resend/resend-php/zipball/b2fc34593c7b8ff7b202f3fcc20f33ce55dde424",
|
||||||
|
"reference": "b2fc34593c7b8ff7b202f3fcc20f33ce55dde424",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"guzzlehttp/guzzle": "^7.5",
|
||||||
|
"php": "^8.1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.13",
|
||||||
|
"mockery/mockery": "^1.6",
|
||||||
|
"pestphp/pest": "^2.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/Resend.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Resend\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Resend and contributors",
|
||||||
|
"homepage": "https://github.com/resend/resend-php/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Resend PHP library.",
|
||||||
|
"homepage": "https://resend.com/",
|
||||||
|
"keywords": [
|
||||||
|
"api",
|
||||||
|
"client",
|
||||||
|
"php",
|
||||||
|
"resend",
|
||||||
|
"sdk"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/resend/resend-php/issues",
|
||||||
|
"source": "https://github.com/resend/resend-php/tree/v0.19.1"
|
||||||
|
},
|
||||||
|
"time": "2025-08-06T04:57:27+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/db-dumper",
|
"name": "spatie/db-dumper",
|
||||||
"version": "3.8.0",
|
"version": "3.8.0",
|
||||||
|
|||||||
@@ -36,6 +36,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'mailers' => [
|
'mailers' => [
|
||||||
|
// 'resend' => [
|
||||||
|
// 'transport' => 'resend',
|
||||||
|
// ],
|
||||||
|
|
||||||
'smtp' => [
|
'smtp' => [
|
||||||
'transport' => 'smtp',
|
'transport' => 'smtp',
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="fa" dir="rtl">
|
||||||
<body>
|
<body style="text-align: right; font-family: Tahoma, Arial, sans-serif;">
|
||||||
<h2>Your Verification Code</h2>
|
<h2>کد تأیید شما برای {{ config('app.name') }}</h2>
|
||||||
<p>Use the code below to verify your email:</p>
|
<p>برای تأیید ایمیل خود از کد زیر استفاده کنید:</p>
|
||||||
<h1>{{ $code }}</h1>
|
<h1>{{ $code }}</h1>
|
||||||
<p>This code will expire in 15 minutes.</p>
|
<p>این کد تا ۱۵ دقیقه معتبر است.</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user