Explorar o código

ticket notify

Tokumeikoi %!s(int64=4) %!d(string=hai) anos
pai
achega
deb12ae707
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/Http/Controllers/Admin/TicketController.php

+ 2 - 1
app/Http/Controllers/Admin/TicketController.php

@@ -6,6 +6,7 @@ use App\Jobs\SendEmailJob;
 use Illuminate\Http\Request;
 use App\Http\Controllers\Controller;
 use App\Models\Ticket;
+use App\Models\User;
 use App\Models\TicketMessage;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\DB;
@@ -111,7 +112,7 @@ class TicketController extends Controller
     private function sendEmailNotify(Ticket $ticket, TicketMessage $ticketMessage)
     {
         $user = User::find($ticket->user_id);
-        $cacheKey = 'ticket_sendEmailNotify';
+        $cacheKey = 'ticket_sendEmailNotify_' . $ticket->user_id;
         if (!Cache::get($cacheKey)) {
             Cache::put($cacheKey, 1, 1800);
             SendEmailJob::dispatch([