It's a bit overdue, but I need to add chapter headings to each series here at Laracasts. Come along as I use TDD to drive out this small change to the codebase. We might say a video belongs to a series, but also to a chapter within that series. Together, let's figure out how.
Have you ever had a controller action that, over time, grows and grows as you declare and fetch all necessary data for each new section of the page? Very quickly, things can become messy. Lately, I've been thinking about an alternative, widget-based approach for structuring portions of my views. Come along as I build this useful new Widget
class from scratch.
View the source code for this episode on GitHub.
In the previous episode, we tinkered around with the idea of widgets for our views. Let's now, mostly for learning purposes, extract this code into a reusable Composer package that anyone can pull in. When I need to create a new project, I always pull in Laravel Packager to expedite the setup process.
If you can't prove - through automated tests - that your package works correctly, how do you expect users to trust you? In this episode, we'll write a series of tests to confirm that our widget functionality works as expected. Once complete, we'll deploy the code to GitHub. At that point, the only remaining step is to submit to Packagist.org.
In this episode, we'll discuss how to classify content according to any number of taxonomies. To illustrate this, we'll build three models: Series
, Taxonomy
, and Topic
. This should be all we need.
View the source code for this episode on GitHub.
Most of our day-to-day programming isn't glamorous. Sometimes, you'll find yourself spending hours getting a shadow to render correctly. In fact, that's exactly what I'm here to show you today. I recently needed to allow for scrolling CSS shadows that only display when a content area can be scrolled in a particular direction. Luckily, as with so many things on the web, this tricky problem was solved years ago by Lea Verou. Let's learn the secret sauce she implemented to make this particular technique work.
View the source code for this episode on GitHub.
*Series still in development. Check back often for updates.