@extends('admin.layouts.app')
@section('page_title', __('SMS Setting'))
@section('content')
@php
if (old()){
$headerData = array_combine(old('headerDataKeys'),old('headerDataValues'));
$paramData = array_combine(old('paramKeys'),old('paramValues'));
$formData = array_combine(old('formDataKeys'),old('formDataValues'));
$headerData = (empty(array_filter($headerData))) ? null : json_encode($headerData);
$paramData = (empty(array_filter($paramData))) ? null : json_encode($paramData);
$formData = (empty(array_filter($formData))) ? null : json_encode($formData);
} else {
$headerData = $manualSMSMethod['header_data'];
$paramData = $manualSMSMethod['param_data'];
$formData = $manualSMSMethod['form_data'];
}
$headerActive = false;
$paramActive = false;
$formActive = false;
if ($errors->has('headerDataKeys.*') || $errors->has('headerDataValues.*')) {
$headerActive = true;
}elseif ($errors->has('paramKeys.*') || $errors->has('paramValues.*')) {
$paramActive = true;
} elseif ($errors->has('formDataKeys.*') || $errors->has('formDataValues.*')) {
$formActive = true;
} else {
$headerActive = true;
}
@endphp
@include('admin.control_panel.components.sidebar', ['settings' => config('generalsettings.sms'), 'suffix' => ''])