From 5d9953c415f36d2fac931eb32a0ec64b6c3baebf Mon Sep 17 00:00:00 2001 From: Abdelmjid Saber <87904671+megoxv@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:16:11 +0300 Subject: [PATCH] fix contacts route and login --- routes/api.php | 2 +- src/Http/Controllers/APIs/AuthController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api.php b/routes/api.php index 810417e..3b99643 100644 --- a/routes/api.php +++ b/routes/api.php @@ -36,7 +36,7 @@ if(config('filament-accounts.features.contacts')){ - Route::middleware(['auth:sanctum'])->name('api.')->prefix('api/profile')->group(function (){ + Route::name('api.')->prefix('api/profile')->group(function (){ Route::post('contact',[\TomatoPHP\FilamentAccounts\Http\Controllers\APIs\ContactsController::class,'send'])->name('contact.send'); }); } diff --git a/src/Http/Controllers/APIs/AuthController.php b/src/Http/Controllers/APIs/AuthController.php index db34fa8..11b9023 100644 --- a/src/Http/Controllers/APIs/AuthController.php +++ b/src/Http/Controllers/APIs/AuthController.php @@ -64,7 +64,7 @@ public function login(Request $request): JsonResponse ]); $check = auth($this->guard)->attempt([ - "username" => $request->get($this->loginBy), + config('filament-accounts.login_by') => $request->get($this->loginBy), "password" => $request->get('password') ]);