This video will be available to
subscribers on Thu, May 1, 2025.
You must be a subscriber to view this video.
May 1, 2025
6m:26s

Handling "Bad" Routes

Classification
Software Engineering | Languages | PHP
Keywords
oop | php

About This Episode:

Not all roads lead somewhere… and that’s okay—as long as we handle it gracefully! In this video, we improve the robustness of our app by dealing with invalid routes and unexpected errors the pragmatic way. 🛡️

Here’s what we’ll do:
• Make the header element optional in layout/_header.view.php using isset() 🧩
• Create clean, user-friendly error views:
• views/errors/404.view.php 🔍
• views/errors/500.view.php 💥
• Add a global try-catch block in index.php to handle exceptions gracefully 🧯

With this in place, our app won’t crash or confuse users when something goes wrong. Instead, it responds with clarity and professionalism.

By the end of this video, we’ll be on version v7-handle-bad-routes—stable, polished, and production-ready. 🚀
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.