atualizacao
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\configs;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use App\Models\turmas;
|
||||
use App\Models\Turma;
|
||||
use App\Models\envios_wpp;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
@@ -38,7 +39,8 @@ class Envio_Mensagem_Whatsapp implements ShouldQueue
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
$turma = turmas::findOrFail($this->idTurma);
|
||||
$turma = Turma::findOrFail($this->idTurma);
|
||||
$token = configs::where('nome', '=', 'wuzapi_token')->first();
|
||||
$detalhes = [];
|
||||
|
||||
|
||||
@@ -99,7 +101,7 @@ class Envio_Mensagem_Whatsapp implements ShouldQueue
|
||||
case 'texto':
|
||||
$response = Http::withHeaders([
|
||||
'accept' => 'application/json',
|
||||
'token' => '3aCSVE4jS9h233mNBr1awz3DF0In8CFk',
|
||||
'token' => $token->valor,
|
||||
])
|
||||
->post('https://waha.cae.app.br/chat/send/text', [
|
||||
'phone' => $turma->id_whatsapp,
|
||||
@@ -177,7 +179,7 @@ class Envio_Mensagem_Whatsapp implements ShouldQueue
|
||||
case 'imagem';
|
||||
$response = Http::withHeaders([
|
||||
'accept' => 'application/json',
|
||||
'token' => '3aCSVE4jS9h233mNBr1awz3DF0In8CFk',
|
||||
'token' => $token->valor,
|
||||
])
|
||||
->post('https://waha.cae.app.br/chat/send/image', [
|
||||
'phone' => $turma->id_whatsapp,
|
||||
|
||||
Reference in New Issue
Block a user