change migration name

This commit is contained in:
2025-05-04 12:58:18 +03:30
parent 314645761b
commit 67efae2875
7 changed files with 20 additions and 22 deletions

View File

@@ -25,17 +25,22 @@ class CallController extends Controller
{
use ApiResponse;
public function store(StoreRequest $request,NotificationService $notificationService): JsonResponse
/**
* @throws OperatorNotConnectedException
* @throws OperatorOfflineException
* @throws NotificationServerNotRespondingException
*/
public function store(StoreRequest $request, NotificationService $notificationService): JsonResponse
{
try
{
$call = DB::transaction(function () use ($request)
{
$operator = User::query()->where('telephone_id', $request->telephone_id)->first();
$operator = User::query()->where('telephone_id', $request->extension)->first();
$call = Call::query()->create([
'telephone_id' => $request->telephone_id,
'caller_phone_number' => $request->caller_phone_number,
'telephone_id' => $request->extension,
'caller_phone_number' => $request->caller_id,
'operator_id' => $operator->id,
'operator_username' => $operator->username,
'operator_full_name' => $operator->full_name