@php use App\Models\Customer; @endphp @php $customer = Customer::where('handphone', 'LIKE', '8%')->get(); @endphp @foreach ($customer as $data)
{{ $data->handphone }}
@php // Tambahkan '0' di depan nomor jika belum ada if (substr($data->handphone, 0, 1) !== '0') { $data->handphone = '0' . $data->handphone; $data->save(); } @endphp @endforeach