protected $description = 'Student have a computed status, which is stored in the DB for performance reasons. In case statuses get out of sync, this command will resync them.';
13
14
public function __construct()
15
{
16
parent::__construct();
17
}
18
19
public function handle()
20
{
21
foreach (Student::where('lead_type_id', 1)->get() as $student) {
22
$student->update(['lead_type_id' => null]);
23
}
24
25
foreach (Student::enrolled()->get() as $student) {