redirect causes problem for notification sending

This commit is contained in:
ilmedova 2022-12-05 16:26:52 +05:00
parent 9e92bbe147
commit b2cad5045e
2 changed files with 3 additions and 5 deletions

View File

@ -129,9 +129,9 @@ public function createAppTicket(Request $request){
$ticket = new Ticket($request->only('content', 'title','category_id', 'client_id', 'account_id', 'application_id'));
$ticket['status_id'] = 1;
$ticket->save();
$users = Client::where('is_suspended', 0)->where('account_id', $request->account_id)->get();
Notification::send($users, new NewTicket());
return redirect()->route('chat',['ticket_id' => $ticket->id]);
$not_suspended_clients = Client::where('is_suspended', 0)->where('account_id', $request->account_id)->get();
Notification::send($not_suspended_clients, new NewTicket());
return redirect(route('chat',['ticket_id' => $ticket->id]));
}
public function accountForTicketsAjax(Request $request){

View File

@ -22,8 +22,6 @@
class ApplicationCrudController extends CrudController
{
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
// use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
// use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
/**