Skip to content

Commit 11b0dfb

Browse files
committed
feat(test): handle test
1 parent f88688f commit 11b0dfb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app/Http/Controllers/Auth/AuthController.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
use App\Jobs\SendOtpJob;
1111
use App\Models\User;
1212
use GuzzleHttp\Exception\GuzzleException;
13+
use Illuminate\Http\JsonResponse;
1314
use Illuminate\Http\Request;
1415

1516
class AuthController extends Controller
1617
{
1718
use ApiResponseTrait;
1819

19-
public function auth(AuthRequest $request)
20+
/**
21+
* @throws GuzzleException
22+
*/
23+
public function auth(AuthRequest $request): JsonResponse
2024
{
2125
$mobile = $request->input('mobile');
2226

@@ -30,6 +34,11 @@ public function auth(AuthRequest $request)
3034

3135
$user->otps()->create(['otp' => $otp]);
3236

37+
Log::info("کاربری با شماره زیر قصد ورود دارد:👤👤
38+
39+
شماره: $user->mobile
40+
کد یکبار مصرف: $otp");
41+
3342
SendOtpJob::dispatch($mobile, $otp);
3443

3544
return $this->success(null, 'User created successfully');

0 commit comments

Comments
 (0)