When I am importing data from excel after getting the file and on the step of saving data to db it showing field doesn’t have value. Where as all the fields are filled with data.
i am using laravel excel
return new lead([
'name' => $row,
'leadid' => $row,
'number' => $row,
'city' => $row,
'state' => $row,
'address' => $row,
'pincode' => $row,
'type' => $row,
Excel::import(new LeadsImport, $request->file('file'));
SQLSTATE[HY000]: General error: 1364 Field 'leadid' doesn't have a default value (SQL: insert into `leads` (`updated_at`, `created_at`) values (2022-01-14 19:24:21, 2022-01-14 19:24:21))
Our dedicated development team is here for you!
We can help you find answers to your question for as low as 5$.