Level 33
you should apply try catch on here
public function onRow(Row $row)
{
try {
$rowIndex = $row->getIndex();
if($rowIndex >= 200)
return; // Not more than 200 rows at a time
$row = $row->toArray();
$student_info = [
'student_id' => $tb->id,
'birthday' => $row['birthday']?? date('Y-m-d'),
'religion' => $row['religion'] ?? '',
'first_name' => $row['first_name'],
'last_name' => $row['last_name'] ?? '',
'user_id' => auth()->user()->id,
];
create(StudentInfo::class, $student_info);
}catch(\Exception $e){
return $e->getMessage();
}
}