I am trying to upload csv and import csv data to database it works fine, but I am facing issue with the integer field in the database.
My csv file have product name and quantity field
Excel::filter('chunk')->load($uploaded_file)->chunk(100, function($results) {
foreach($results as $result) {
echo $result->quantity; # When I try to insert it is 0 because it is string
# I tried typecasting (int)$result->quantity; it leads to 0
# And also intval($result->quantity); this too leads to 0
}
});