This video will be available to
subscribers on Tue, Feb 3, 2026.
You must be a subscriber to view this video.
Feb 3, 2026
22m:49s

Cookies

Classification
Software Engineering | Frameworks | Laravel
Keywords
laravel | php

About This Episode:

In this video, we explore Laravel Cookies—what they are, how they work under the hood, and how your Laravel application can set, retrieve, and delete them. Cookies are one of the foundational building blocks for maintaining state in a stateless HTTP world, and understanding them sets the stage for working with sessions effectively. In this video you will learn:

🔹 What Cookies Are
- Why HTTP is stateless and how cookies help solve that
- How cookies allow the server to remember clients across requests
- Where cookies are stored and how they travel between client and server
- Client-side vs server-side visibility (HTTP-only vs accessible from JavaScript)
- Common uses (session identifiers, personalization, analytics, etc.)

🔹 Setting Cookies in Laravel
- You’ll see how Laravel allows you to:
- Queue cookies to be added to the outgoing response
- Attach cookies directly to a response object
- Configure cookie attributes such as expiration time, path, domain, secure mode, and HTTP-only mode
- Work with encrypted cookies (default in Laravel)
- We walk through multiple approaches, and the vid eo explains when you’d use each one.

🔹 Retrieving Cookies
We compare:
- Raw PHP cookie access
- Laravel’s cookie retrieval helpers
- Using the request object to access cookies
- Automatically decrypted values in Laravel

🔹 Deleting Cookies
You’ll see how to invalidate cookies and remove them properly from the browser.

🔹 Production Considerations
We discuss:
- Why you almost always want encrypted or signed cookies
- What types of data should not be stored in cookies
- Practical tips for secure cookie handling

#Laravel #PHP #WebDevelopment #SoftwareEngineering #BackendDevelopment #CodingBestPractices #TechEducation #LearnToCode #TekCasts
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.