This video will be available to
subscribers on Thu, Jun 5, 2025.
You must be a subscriber to view this video.
Jun 5, 2025
29m:47s

Submitting Reviews

Classification
Software Engineering | Languages | PHP
Keywords
oop | php

About This Episode:

It’s time to let users have their say! In this video, we implement the “Leave a Review” feature, allowing users to submit feedback on photos directly from the app. 💬

Here’s what’s packed into version v17-leave-review:


Add a POST route to handle form submissions 🛤️
Stub out the PhotoController::store method as our entry point for review handling
Wire up the review form and hook it into the controller 🧵
Introduce basic validation to catch missing fields or bad data 🧼
Add temporary dd('TODO') calls as placeholders for future redirects
Build the SQL insert logic using the photo_id from the query string 🔗
Validate that the photo exists before inserting a review to maintain data integrity 🔒
Refactor the Database class:
Rename exec() to raw() for clarity
Add a new execute() method to handle parameterized inserts and return the number of affected rows ⚙️


By the end of this video, users can leave their thoughts—and our app takes one more step toward being fully interactive. 🌟
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.