mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
ticket notify
This commit is contained in:
parent
bf3b7bb66f
commit
deb12ae707
@ -6,6 +6,7 @@ use App\Jobs\SendEmailJob;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Ticket;
|
use App\Models\Ticket;
|
||||||
|
use App\Models\User;
|
||||||
use App\Models\TicketMessage;
|
use App\Models\TicketMessage;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
@ -111,7 +112,7 @@ class TicketController extends Controller
|
|||||||
private function sendEmailNotify(Ticket $ticket, TicketMessage $ticketMessage)
|
private function sendEmailNotify(Ticket $ticket, TicketMessage $ticketMessage)
|
||||||
{
|
{
|
||||||
$user = User::find($ticket->user_id);
|
$user = User::find($ticket->user_id);
|
||||||
$cacheKey = 'ticket_sendEmailNotify';
|
$cacheKey = 'ticket_sendEmailNotify_' . $ticket->user_id;
|
||||||
if (!Cache::get($cacheKey)) {
|
if (!Cache::get($cacheKey)) {
|
||||||
Cache::put($cacheKey, 1, 1800);
|
Cache::put($cacheKey, 1, 1800);
|
||||||
SendEmailJob::dispatch([
|
SendEmailJob::dispatch([
|
||||||
|
Loading…
Reference in New Issue
Block a user