@php use App\Models\Customer; @endphp @php $customer = Customer::where('handphone', 'LIKE', "%?%")->get(); @endphp @foreach ($customer as $data)
{{ $data->handphone }}
@php $cleanedHandphone = str_replace("?", '', $data->handphone); if ($cleanedHandphone !== $data->handphone) { $data->handphone = $cleanedHandphone; $data->save(); echo "Updated: {$cleanedHandphone}
"; } @endphp @endforeach