Back Button Laravel

Laravel 5.2 From Scratch

Each year, the Laracasts "Laravel From Scratch" series is refreshed to reflect the latest iteration of the framework. This is the 2016 edition, which uses version 5.2 of the framework.

Are you hoping to level up your toolset? You've come to the right place. This series will take you from installing Laravel, all the way up to mastering the essentials of the framework.

Beginner
Difficulty
18 episodes
3:26:05 hrs
Start Series
Notification bell This series has been archived. We instead recommend: Laravel 5.7 From Scratch A series is marked as archived when the content is no longer up-to-date or relevant to most viewers.
    1. Run Time 5:01 Free

      So you want to level up with Laravel? Excellent choice (high five). The first step, of course, is to install Laravel on our machine. We'll do that installing Composer, pulling in Laravel's helpful installer utility, and then running laravel new project to generate the project.

    2. Run Time 6:17 Free

      The "hello world" for frameworks is to figure out how to process a given URI, and display the appropriate HTML on the page. In this lesson, you'll learn how to create routes, and load views. It's all very simple and natural, as you'll find.

    3. Run Time 6:35 Free

      You'll frequently need to pass data to your views. While figuring out how to accomplish this, you'll also get your first peek at Laravel's templating engine, called Blade.

    4. Run Time 4:34 Free

      Using route closures is very useful for small projects that don't require too much functionality. However, you'll likely find that, for most projects, you'll want to route directly to controllers. Let me show you how to do that.

    5. Run Time 4:17 Free

      To reduce duplication, Laravel's templating engine, Blade, provides what we call "layout files." Within these files, we can define the wrapping HTML, which nests the content from each of your views.

    6. When it comes to including your assets (CSS and JavaScript files), you can either create directories within your public folder, or you can leverage Laravel Elixir. With the latter, you can easily make use of Sass, Less, Browserify, or any number of useful tools!

      Though it was not referenced in this video, make sure that you install Gulp globally first: npm install --global gulp.

    7. Run Time 21:31 Free

      We've arrived at the fun part. You'll first learn how to create migrations to build up your database tables. Next, we'll use the query builder and Eloquent to fetch data, and render it in the view.

    8. Eloquent provides a beautiful mechanism for referencing relationships. For example, a comment belongs to a post, a card can have many notes, and an article can both belong to and have many tags. Let's demonstrate the basic workflow for creating these relationships today.

    9. Run Time 18:10 Free

      Let's review the basic workflow for submitting a form, fetching the data that was sent through, and then creating a record in the database.

    10. You'll of course need to modify existing records in the database. Let's review the process of creating an "edit" page to handle this very task. Along the way, we'll also get a chance to review PATCH requests and the concept of eager loading and the problems it solves.

    11. Run Time 18:06 Free

      The core topic for this lesson is validation, however, as you'll find, we'll also tackle a number of little things: group middleware, CSRF, old input, and more.

    12. Run Time 1:36 Free

      On February 26th, 2016, I made a request (in the video above) for all viewers to ask any questions they had about the series thus far. Did something not quite click? Ask away! On February 29th, I answered these questions below.

      Before you continue on, take some time to review the comments below. You might pick up a tip or two.

    13. Run Time 6:29 Free

      Most applications will require some form of authentication. With Laravel, it genuinely could not be simpler. Let's setup registration, authentication, and password resets in a matter of minutes.

    14. Run Time 13:16 Free

      Think of middleware as layers of an onion. To get through to the core of your application, a request must first pass through these various layers. Perhaps one layer determines if the application is in maintenance mode. Another layer, or middleware, might verify that the user is signed in as an administrator.

    15. Run Time 13:09 Free

      You get to learn about session handling today. Specifically, we'll figure out how to flash notification messages to the session. This way, we can send quick alerts to the user that only exist for a single request.

    16. It's vital that you fully understand this next topic. In many ways, the service container is the heart of Laravel. A proper understanding is paramount to your success with Laravel. Let's review all the details in this lesson.

    17. Service providers, though a bit confusing at first, offer a mechanism for any component to register itself with Laravel. Whether you're bootstrapping a custom package, or simply registering a series of events listeners, it all takes place in a service provider. I'll teach you the ins and outs in this lesson.

    18. Run Time 8:59 Free

      Every series must end at some point. For "Laravel From Scratch" (laravelfromscratch.com), that time is now. In this final review, we'll do a final sweep over Laravel's directory structure, and review what we've learned. Naturally, there's so much more to cover; so get back to the "Laravel" Skill here at Laracasts, and move on to the next step!

You May Also Enjoy...

Here are some additional series that may be up your alley.

Vue Laravel and the Front-end
Beginner
Difficulty

Let's take a break from the back-end, and instead focus on that other world: the front-end! Don't worry, Laravel 5 has made this process as enjoyable...

49:57 mins
Play
Laravel Laravel 5 Fundamentals
Beginner
Difficulty

Each year, the Laracasts "Laravel From Scratch" series is refreshed to reflect the latest iteration of the framework. This is the 2015 edition, which...

5:43:35 hrs
Play
Laravel Advanced Eloquent
Advanced
Difficulty

Sure, you've learned the essentials of using Eloquent in your applications, but do you really understand what's going on under the hood? Well, that's...

58:10 mins
Play
Laravel Intermediate Laravel
Intermediate
Difficulty

Made your way through Laravel 5 Fundamentals yet? Nice job! It's time to dig a bit deeper. In this series, not only will we review higher level featur...

2:30:07 hrs
Play
Laravel What's New in Laravel 5.1
Beginner
Difficulty

Laravel 5.1 includes a variety of welcomed new features. Everything from broadcasting events, to massively improved testing facilities, to LTS support...

2:11:21 hrs
Play
Laravel Build "ProjectFlyer" With Me
Intermediate
Difficulty

In this series, from scratch, you'll come along with me as I build a web app, called "Project Flyer." We'll tackle everything from the domain name pur...

2:47:33 hrs
Play
Laravel Eloquent Techniques
Beginner
Difficulty

For any Laravel user, a solid understanding of Eloquent is crucial. In this series, we'll review a number of key techniques for your toolbelt.

50:20 mins
Play
Laravel What's New in Laravel 5.2
Beginner
Difficulty

It's about that time again. Laravel 5.2 is on its way (possibly in January, 2016), with a variety of useful new additions. Let's get ahead of the game...

49:50 mins
Play
Laravel Russian-Doll Caching in Laravel
Advanced
Difficulty

Popularized in the Rails world, Russian Doll caching is an interesting approach, where you create nested fragment caches for your view logic. If you t...

1:37:45 hrs
Play
Laravel Laravel Authentication Techniques
Intermediate
Difficulty

While Laravel offers a robust, traditional authentication setup out of the box, you may find that you require unique setups for certain projects. Perh...

52:32 mins
Play
Laravel What's New in Laravel 5.3
Intermediate
Difficulty

It's about that time again! The release of Laravel 5.3 is imminent. That means, it's finally time to dig in and see what's new. And, well, there's a l...

2:43:50 hrs
Play
Laravel What's New in Laravel 5.4
Intermediate
Difficulty

It's that time of year again! Laravel is on the cusp of graduating to version 5.4. Along with it comes a variety of excellent new optimizations and fe...

32:17 mins
Play
Laravel Let's Build A Forum with Laravel and TDD
Advanced
Difficulty

A forum is a deceptively complex thing. Sure, it's made up of threads and replies, but what else might exist as part of a forum? What about profiles,...

19:29:26 hrs
Play
Laravel What's New in Laravel 5.5
Intermediate
Difficulty

Here we go again! Currently scheduled for an August release date, we're on the verge of Laravel 5.5. With that in mind, let's get a head start on the...

1:31:44 hrs
Play