@php if (strpos(\App\Models\SplunkSearches::getNameForId($widget->id), 'for 6 months')) { $from = '-6mon@mon'; } $xLabelModes = [ \App\Models\SplunkSearches::X_TIME_LABEL_DAYS => 'day', \App\Models\SplunkSearches::X_TIME_LABEL_MONTHS => 'month', \App\Models\SplunkSearches::X_TIME_LABEL_YEARS => 'year', \App\Models\SplunkSearches::X_TIME_LABEL_HOURS => 'hour', ]; $xLabelMode = $xLabelModes[$widget->x_displaying_time_period] ?? 'auto'; @endphp