Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AbdulBazith's avatar

how to upload bulk questions from excel sheet to database in laravel

Guys iam working with a project online examination.

first the staff need to enter the questions and options with correct answer in database.

currently what i have a form is staff need to longin, and the need to choose the subject, class, chapter, topic and then need to type the question in tinymce editor (may have special greek characters so) and the 4 options that too in tinymce box and the if any relavent images and the submit the question. the question will save in database.

this works fine, for they have more that 2000 questions in each subject. the cant type each question like this.

is there any simple way to upload all the questions??

i thought about importing through excel sheet. because they have the questions in excel sheet only.

what my expectation is first the need to choose the class, subject and chapter in the form, and then they have to upload the excel sheet. so that the class_id, subject_id, chapter_id will be stored remaining columns are filled by the excel sheet data.

is this possible??

same problem in user table also. they have bulk of student list in excel, while exporting it first this should be stored in users table so that account is created for students, the student_information table remaining columns must be stored.

all this is possible in laravel kindly some one help please

0 likes
3 replies
Tjyoung's avatar

Using Navcat or tableplus MySQL admin your would just export as csv, ensure headers are same in csv as table and import

Please or to participate in this conversation.