<?php

use Illuminate\Database\Seeder;

class BindPhoneSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $students = \App\Models\Student::all();
        foreach($students as $student) {
            if(!empty($student->phone)) {
                $student->bind_phone = 2;
                $student->save();
            }
        }
    }
}
