The Laracasts Blog

-- latest

When building your Laravel apps, it's common to use config values on the frontend, this can be for pulling out configuration values, checking if a feature is enabled, displaying a predefined value, using public keys in JS for services like Stripe, etc.

I recently worked on an application for making hotel reservations. A customer books a room, and we charge them using one of our payment gateways. However, I also needed to support multiple payment gateways, such as Stripe, Paddle, and Paypal. Learn how I used the Manager Pattern to provide a consistent and clean API.

I recently logged in to Slack, and noticed that they offer the option of authenticating via a magic login link. Neat! I made a mental note. Fast forward, and for one of my side projects, I decided to offer a similar functionality. Let me show you what I did!

Programming taught me an interesting life lesson: be a stickler for the details. You see, getting the thing to work is only half the battle. You’re not done. Not even close. Yes, make it functional. But then make it readable. Should it also be flexible? Then do so. And certainly make it beautiful.

When it comes to business, I - like many developer-turned-small-business-owners, I’d imagine - am really quite green. Not just green, deep green. No MBA in sight. I’m not even sure what that stands for, to be honest. Master of Business Administration? Is that it? Yep, a master of business… yours truly is not. I was instead thrust into the schools of “business acronym Googling” and “fly by the seat of your pants.”

I’ve given this a good bit of thought. Late at night, when I can’t sleep, I imagine a potential variation on my life; one in which I commute to work each morning before my kids wake up. I spend 8-10 hours at a desk writing code, and return home around 6pm. I step out of my car, and approach the front door, slowly reaching for the keys in my pocket. I release one of those fatigued sighs that only I can hear, and then unlock the door to my two young kids, excited to see me. The best part of my day.

Ladies and gentlemen, come inside, have a seat. I bring good news! After a lifetime of travel and research, I’ve returned, having finally uncovered the secret to writing successful, maintainable programs.” He taps his temple. “It’s all right here."

The definition of clean code is subjective. It's often a source of heated debates between developers on the web. For this article, we will focus on features in Laravel that enable us to write less code.

I can count just three hobbies in my life that are deep enough to continuously reignite my love and enjoyment. As I was thinking about this a few weeks ago, it occurred to me that each one, like hiding medicine in dog food, managed to provide unique, valuable lessons that have overflowed into how I organize and construct my life, in general.

Coding is fun. But debugging? ...Not so much. That's why testing is crucial for the success of your projects. In this article, I will show you how easy it is to begin testing your Laravel applications.

I can still remember it. Eight years old, second grade, Mrs. King’s class, and I’m openly stressing to my friends about a particular embarrassment that I’m hoping to conceal from the other students. To tell you the truth, the one thing I can't remember is what this embarrassment exactly was. But, hey, it was second grade in the 90s; it could have been anything. Even a jean length that didn’t adequately cover your ankles was cause for ridicule in 1993.

What makes the Laravel ecosystem magical is that there are always new things to learn and experiment with. Some of the latest additions to it are Laravel Folio and Volt. Embracing these new tools and principles can enhance your productivity and transform how you build web applications with Laravel. Let me show you by building a simple online store.

Hello, everyone! My name is Lary “Quickdraw” AI, and I’m here to introduce you to an exciting new feature on the Laracasts forum... automatic AI-generated replies! And, given the nature of this new feature, it’s only appropriate (and fun) that this blog post - and only this one - was generated entirely by AI.

I’ve kept a somewhat scatter-brained version of the following text as a Laracasts instructor onboarding Trello card for years now, but it occurred to me that it might prove useful to others who hope to create educational content.

As you can imagine, Laracasts frequently receives requests for new courses and site features. One feature request in particular that often pops up is companion written tutorials for every video. It’s not a bad idea! In a perfect world, this would be a natural and perfect addition to the site. But, as always, there’s one big roadblock... time.

Most of us are surely familiar with the phrase, “Lost in translation.” But if not, it generally refers to words or concepts that lose their meaning or subtlety when translated from one language to another. The same is also true when “translating” or parsing educational content.

I often joke that, at my funeral, someone will ask, "Which syntax theme did he use?" Pick any Laracasts lesson and you’re bound to find at least one comment that ignores the subject matter of the video entirely, and instead focuses on what’s most important to us all... what theme and font is that?

Fun fact. Laracasts originally launched back in 2013 as a collection of isolated video tutorials. One video, one technique, move on to something else. There wasn’t yet any concept of a series or course. But not long after the launch, I ran into a handful of hurdles.

Here’s a quiet truth that most small business owners I’m friendly with would surely agree with. When hiring, a certain percentage of job applications are instantly tossed in the trash. It sounds harsh. It is. But it’s also the truth.

I’ve been thinking about writing this blog post for months. It was the light at the end of an increasingly long tunnel. "When this project is finally done,” I’d tell myself, "I’ll set aside one Friday afternoon, find a seat at the coffee shop nearest to my home, and write an announcement - to the small portion of the world who cares about such things - that Laracasts is officially an SPA."

Launching and maintaining an increasingly popular forum requires nonstop attention on the developer’s part. Sure, the initial forum launch went smoothly enough. And why wouldn't it? Nobody outside your immediate circle knows it even exists. People are generally good. Of course, they won’t take advantage of your new platform. Right?