2026_04_02_090928_create_incidents_table
2026_04_02_090932_create_incident_actions_table
2026_04_02_090935_create_incident_root_causes_table
2026_04_02_090939_create_incident_corrective_action_plans_table
2026_04_02_090942_create_incident_final_actions_table
2026_04_02_090945_create_incident_fat_documents_table

Incident
IncidentAction
model IncidentRootCause
IncidentCorrectiveActionPlan
IncidentFinalActionTaken
IncidentFatDocument

use this migration and their respective model

i want to follow my coding habit and styles and directory structure

I want you to create a public Api for submitting incident

create a controller and implementation here call it IncidentReportingController

/home/victorscott/Projects/Laravel/qms_sys/app/Http/Controllers/Frontend

then create a one page react appliaction to submit data, make sure it save on redux slice then submit once, should be done in three steps wizard but also the design should be be like this

/home/victorscott/Projects/Laravel/qms_sys/resources/views/frontend/main/layout.blade.php

colors and how it looks, for select use select2 react and utilize also checkbox and radio buttons

SEE THIS FORM PDF OF HOW THE QUESTIONS AND ANSWERS SHOULD FOLLOW EACH OTHER

/home/victorscott/Documents/B2/Pictures/qms/Occurrences Report Form.pdf
/home/victorscott/Documents/B2/Pictures/qms/Occurrences Report Form 2.pdf

for this react use js and jsx and npm and axios

create the react app here

/home/victorscott/Projects/JS/AI

When you complete doing this now

create now its backoffice pages and approval pages

for this you will creat controllers here

/home/victorscott/Projects/Laravel/qms_sys/app/Http/Controllers/Portal

create one main directory and call it Incident then insite have controllers

work for general management works like

/home/victorscott/Projects/Laravel/qms_sys/app/Http/Controllers/Portal/AuditController.php

and

another directory with all this functionalities

/home/victorscott/Projects/Laravel/qms_sys/app/Http/Controllers/Portal/Action should have actions, root_cause is same as the FiveWhys and all others

and another directory with all this kind of fuctionalities

/home/victorscott/Projects/Laravel/qms_sys/app/Http/Controllers/Portal/Approval for approvals

note all shoud be

Incident
IncidentAction
model IncidentRootCause
IncidentCorrectiveActionPlan
IncidentFinalActionTaken
IncidentFatDocument new model and database tables see the migration above

for the views add another directory for incident here

/home/victorscott/Projects/Laravel/qms_sys/resources/views/portal/pages

the js file also copy my idea and add here

/home/victorscott/Projects/Laravel/qms_sys/public/js

for incident

see my coding struture for js and

blade

/home/victorscott/Projects/Laravel/qms_sys/resources/views/portal/pages/audit/index.blade.php

for public api add here

/home/victorscott/Projects/Laravel/qms_sys/routes/api.php

and the ones for back office

/home/victorscott/Projects/Laravel/qms_sys/routes/web.php

make sure you add there same way as the existing have been structured

/home/victorscott/Projects/Laravel/qms_sys/public/js/approval/approval_action.js

now start development and make all it works, document each step creally, send email where need be just like my audit process

