From 677c9b390da797f7997ccd74c2698387d2d31f0c Mon Sep 17 00:00:00 2001 From: Xinecraft Date: Thu, 12 Dec 2024 17:31:38 +0530 Subject: [PATCH] password reset fix & poll permission --- app/Http/Controllers/Admin/PollController.php | 4 ++-- config/auth.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/PollController.php b/app/Http/Controllers/Admin/PollController.php index 2eb95a78a..839c52b69 100644 --- a/app/Http/Controllers/Admin/PollController.php +++ b/app/Http/Controllers/Admin/PollController.php @@ -76,7 +76,7 @@ public function store(CreatePollRequest $request) public function lock(Request $request, Poll $poll) { - $this->authorize('update', Poll::class); + $this->authorize('update', $poll); $poll->is_closed = true; $poll->save(); @@ -87,7 +87,7 @@ public function lock(Request $request, Poll $poll) public function unlock(Request $request, Poll $poll) { - $this->authorize('update', Poll::class); + $this->authorize('update', $poll); $poll->is_closed = false; $poll->save(); diff --git a/config/auth.php b/config/auth.php index e572bb791..2ecc14173 100644 --- a/config/auth.php +++ b/config/auth.php @@ -100,7 +100,7 @@ 'passwords' => [ 'users' => [ 'provider' => 'users', - 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'), + 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_resets'), 'expire' => 60, 'throttle' => 60, ],