@php $allErrors = []; if (isset($errors)) { foreach ($errors->getBags() as $bag) { $allErrors = array_merge($allErrors, $bag->all()); } } @endphp