This video will be available to
subscribers on Tue, Dec 23, 2025.
You must be a subscriber to view this video.
Dec 23, 2025
14m:43s

Form Data & HTTP Post Handlers

Classification
Software Engineering | Frameworks | Laravel
Keywords
laravel | php

About This Episode:

In this episode, we begin capturing and storing survey data!

We’ll design the database schema for responses and answers, build out models, and wire up the controller logic to handle incoming survey submissions.

This continues our journey of transforming a static survey page into a dynamic Laravel application — step by step, the pragmatic way.

🧠 What You’ll Learn
- Designing survey_responses and survey_response_answers tables
- Creating migrations and Eloquent models
- Defining relationships between surveys, responses, and answers
- Updating POST routes to save incoming data
- Setting up a foundation for validation and fingerprinting

🧩 Commands Used
- php artisan make:migration create_survey_responses_table
- php artisan make:model SurveyResponse

🧱 Database Schema
survey_responses
- id (PK)
- survey_id (FK: surveys)
- user_fingerprint
- completed_at (nullable)
- created_at / updated_at

survey_response_answers
- id (PK)
- survey_response_id (FK: survey_responses)
- survey_question_id (FK: survey_questions)
- answer (json)
- created_at / updated_at

🔗 Resources
- Migrations Docs: https://laravel.com/docs/12.x/migrations
- Eloquent Docs: https://laravel.com/docs/12.x/eloquent
- Routing Docs: https://laravel.com/docs/12.x/routing

#Laravel #PHP #WebDevelopment #Eloquent #DatabaseDesign #Migrations #TekCasts #LearnLaravel #FullStackDevelopment #Controllers
Bob Cravens

Bob Cravens

Your Instructor
more »
Owner
TekFoundry
Wisconsin
United States
Short Bio:
Bob Cravens is a seasoned technology leader, software architect, and educator with a passion for empowering others through practical, real-world knowledge. As the founder of TekFoundry, Bob has dedicated his career to designing and delivering innovative software solutions that combine cutting-edge technology with elegant simplicity.

At TekCasts, Bob leverages over two decades of experience in software engineering, application architecture, and team leadership to create engaging, high-impact courses for developers and technology professionals. His instructional style is rooted in practical application, offering insights drawn from his extensive background in industries like medical devices and global technology consulting.

Bob’s expertise spans a variety of technologies and methodologies, including PHP/Laravel, FastAPI, and DevOps, as well as architecture best practices and team dynamics. Whether teaching foundational concepts or advanced strategies, he’s passionate about helping others turn complex challenges into streamlined solutions.

When not crafting elegant code or inspiring the next generation of tech innovators, Bob enjoys exploring the intersection of technology, business strategy, and creative problem-solving.