namespace App\Imports;
use App\VacancyDkz;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
class VacancyImport implements ToCollection{
public function collection(Collection $rows){
foreach ($rows as $row){
VacancyDkz::create([
'project_name' => $row['project_name'],
'organization_name' => $row['organization_name'],
'adress' => $row['adress'],
'phone' => $row['phone'],
'email' => $row['email'],
'vacancy' => $row['vacancy'],
'quantity' => $row['quantity'],
'salary' => $row['salary'],
]);
}
}
}