@php $iframe = $record?->embed_url; if ($iframe) { // If width exists, replace it with 100% if (preg_match('/width="\d+%?"/', $iframe)) { $iframe = preg_replace('/width="\d+%?"/', 'width="100%"', $iframe); } else { // Otherwise, inject width into the