ticket post and message post permission fixed
This commit is contained in:
parent
345533d75b
commit
5ef2c369db
|
|
@ -62,7 +62,7 @@ public function postMessage(MessageRequest $request)
|
|||
$ticket = Ticket::find($request->ticket_id);
|
||||
if($ticket->last_sender == 'client'){
|
||||
$users = User::with('permissions')->whereHas("permissions", function($q) {
|
||||
$q->whereIn("name", ["tickets","Venue",'Organisation']);
|
||||
$q->whereIn("name", ["tickets"]);
|
||||
})->get();
|
||||
Notification::send($users, new NewTicket());
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ public function postTicket(TicketRequest $request)
|
|||
$ticket['last_sender'] = 'client';
|
||||
$ticket->save();
|
||||
$users = User::with('permissions')->whereHas("permissions", function($q) {
|
||||
$q->whereIn("name", ["tickets","Venue",'Organisation']);
|
||||
$q->whereIn("name", ["tickets"]);
|
||||
})->get();
|
||||
Notification::send($users, new NewTicket());
|
||||
return TicketResource::make($ticket);
|
||||
|
|
|
|||
Loading…
Reference in New Issue