Laravel 5.4 From Scratch

Each year, the Laracasts "Laravel From Scratch" series is refreshed to reflect the latest iteration of the framework. This is the 2017 edition, which uses version 5.4 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.

Videos: 32 Time: 4 hours, 11 minutes Updated: 01-15-2018 Rating: Unrated Completion: 0%
  • Laravel From Scratch: Part 1 - Installation and Composer

    Laravel From Scratch: Part 1 - Installation and Composer

    01-15-2018 / 6 minutes, 30 seconds
    Before we can review how incredible and flexible Laravel is, we, of course, must first learn how to install it. In this episode, we'll review all necessary prerequisites, and then setup Composer on our machine. Watch the full series at http://laravelfroms...
  • Laravel From Scratch: Part 2 - Basic Routing and Views

    Laravel From Scratch: Part 2 - Basic Routing and Views

    01-15-2018 / 4 minutes, 58 seconds
    Your first step, when learning Laravel, should be to visit your main routes/routes.php file. Here, we may define any number of routes for our application. Or, in other words, when the user visits a particular URL, what logic should we trigger? Watch the f...
  • Laravel From Scratch: Part 3 - Laravel Valet is Your Best Friend

    Laravel From Scratch: Part 3 - Laravel Valet is Your Best Friend

    01-15-2018 / 4 minutes, 23 seconds
    We'll get back to the PHP in just a few minutes, but let's take a brief pause to learn about Laravel Valet and how incredibly useful it is. What if you could create a new project with laravel new project, and then immediately view it in the browser by vis...
  • Laravel From Scratch: Part 4 - Database Setup and Sequel Pro

    Laravel From Scratch: Part 4 - Database Setup and Sequel Pro

    01-15-2018 / 2 minutes, 36 seconds
    In this episode, we'll review the process of creating a new database in MySQL, connecting to it (via our .env config), and then setting up any database GUI, such as Sequel Pro. Watch the full series at http://laravelfromscratch.com, or learn more about La...
  • Laravel From Scratch: Part 5 - Pass Data To Your Views

    Laravel From Scratch: Part 5 - Pass Data To Your Views

    01-15-2018 / 5 minutes, 12 seconds
    Admittedly, so far, we've needed to do a bit of boring infrastructure work. But the silver lining is that you now have everything you need to work in a professional environment. You should have PHP 7.1, MySQL, Brew, Composer, and Valet or Homestead instal...
  • Laravel From Scratch: Part 6 - Working With The Query Builder

    Laravel From Scratch: Part 6 - Working With The Query Builder

    01-15-2018 / 9 minutes, 52 seconds
    We can use Laravel's query builder to construct fluent database queries with PHP. No longer are you forced to write fragile and difficult-to-read SQL queries as strings. Let me show you how it works! Watch the full series at http://laravelfromscratch.com,...
  • Laravel From Scratch: Part 8 - Controllers

    Laravel From Scratch: Part 8 - Controllers

    01-15-2018 / 4 minutes, 31 seconds
    So far, we've exclusively been using route closures to handle the logic associated with each URI endpoint. But I think you'll find that, for most projects, you'll instead opt for dedicated controllers. Let's review what they are, and how to migrate over. ...
  • Laravel From Scratch: Part 9 - Route Model Binding

    Laravel From Scratch: Part 9 - Route Model Binding

    01-15-2018 / 2 minutes, 44 seconds
    Route model binding provides a useful way to automatically method-inject a model's instance into your route closures, or controller actions. For example, if a user visits /tasks/1, thanks to route model binding, we can make Laravel automatically fetch the...
  • Laravel From Scratch: Part 10 - Layouts and Structure

    Laravel From Scratch: Part 10 - Layouts and Structure

    01-15-2018 / 11 minutes, 48 seconds
    In this lesson, I'll teach you about how you'll go about organizing layout files, using Blade. You'll find that we can easily allow for dedicated layout/master pages. This way, each of our views only needs to reference the layout it extends, and then buil...
  • Laravel From Scratch: Part 7 - Eloquent 101

    Laravel From Scratch: Part 7 - Eloquent 101

    01-15-2018 / 12 minutes, 49 seconds
    Now that you're familiar with the query builder, we can switch over to Eloquent: one of the core pillars of the framework. Eloquent is Laravel's Active Record implementation, which allows each of your models to be associated with a companion database tabl...
  • Laravel From Scratch: Part 11 - Form Request Data and CSRF

    Laravel From Scratch: Part 11 - Form Request Data and CSRF

    01-15-2018 / 20 minutes, 47 seconds
    Let's begin reviewing how you'll go about submitting forms, while also touching upon some of the security concerns that go alongside it. Watch the full series at http://laravelfromscratch.com, or learn more about Laravel and all things web development at ...
  • Laravel From Scratch: Part 12 - Form Validation 101

    Laravel From Scratch: Part 12 - Form Validation 101

    01-15-2018 / 6 minutes, 5 seconds
    It's true that we can now successfully submit and process forms; however, we haven't yet implemented any form of validation. This means that a user can (and will) type anything at all. We can't allow that. Watch the full series at http://laravelfromscratc...
  • Laravel From Scratch: Part 13 - Rendering Posts

    Laravel From Scratch: Part 13 - Rendering Posts

    01-15-2018 / 7 minutes, 23 seconds
    Now that we've added the necessary functionality to publish new posts to the database, we can now filter through and render them on the page, using Blade.
  • Laravel From Scratch: Part 14 - Laravel Mix and the Front End

    Laravel From Scratch: Part 14 - Laravel Mix and the Front End

    01-15-2018 / 6 minutes, 25 seconds
    Of course, you won't spend all of your time working with PHP. At some point, you'll need to write some CSS, perhaps some JavaScript, and, naturally, you'll need some way to optimize that workflow. Let me show you how Laravel Mix works. Watch the full seri...
  • Laravel From Scratch: Part 15 - Eloquent Relationships and Comments

    Laravel From Scratch: Part 15 - Eloquent Relationships and Comments

    01-15-2018 / 5 minutes, 58 seconds
    If a post can have many comments, and, consequently, a comment belongs to a specific post... well how might we represent this within our code? Let's tackle that very thing in this episode.
  • Laravel From Scratch: Part 16 - Add Comments The Way The Client Requests

    Laravel From Scratch: Part 16 - Add Comments The Way The Client Requests

    01-15-2018 / 8 minutes, 38 seconds
    Imagine that you're building this little blog for a client. While speaking with them, they naturally bring up the fact that they'd like to have the ability to add comments to any post. Let's see if we can use that exact terminology in our code to provide ...
  • Laravel From Scratch: Part 17 - Rapid Authentication and Configuration

    Laravel From Scratch: Part 17 - Rapid Authentication and Configuration

    01-15-2018 / 9 minutes, 13 seconds
    Laravel provides a useful make:auth Artisan command that will rapidly scaffold the necessary views and logic for registration, authentication, and password resets. Imagine if you could take this incredibly tedious work, and have it done for you automatica...
  • Laravel From Scratch: Part 18 - Associating With Users

    Laravel From Scratch: Part 18 - Associating With Users

    01-15-2018 / 5 minutes, 10 seconds
    You won't always have the luxury of scaffolding your authentication layer from scratch. And, further, it's of course educational to learn how to perform these steps manually on your own. Let's review the full process from scratch, without deferring to mak...
  • Laravel From Scratch: Part 19 - Authentication and Registration From Scratch

    Laravel From Scratch: Part 19 - Authentication and Registration From Scratch

    01-15-2018 / 22 minutes, 54 seconds
    Now that we have our database relationships all set to go, we can begin scaffolding out the necessary registration and login forms. Watch the full series at http://laravelfromscratch.com, or learn more about Laravel and all things web development at https...
  • Laravel From Scratch: Part 20 - Archives

    Laravel From Scratch: Part 20 - Archives

    01-15-2018 / 11 minutes, 24 seconds
    It would be nice to have a section in the sidebar that displays all months that have associated posts. To allow for this, we'll need to construct a special SQL query that collects and joins the necessary columns. In this lesson, you'll learn how to write ...
  • Laravel From Scratch: Part 21 - View Composers

    Laravel From Scratch: Part 21 - View Composers

    01-15-2018 / 5 minutes, 6 seconds
    Very quickly, you'll encounter the situation when multiple views require the same piece of data. For example, if a sidebar widget requires a particular variable for every single page, well we can't be expected to pass that data from every single controlle...
  • Laravel From Scratch: Part 22 - Testing 101

    Laravel From Scratch: Part 22 - Testing 101

    01-15-2018 / 11 minutes, 26 seconds
    While testing is a bit beyond the scope of this series (see the rest of Laracasts for over a hundred testing-specific lessons), it's important that we, at the very least, review the general layout and workflow for testing a Laravel application. Watch the ...
  • Laravel From Scratch: Part 23 - DI Automatic Resolution and Repositories

    Laravel From Scratch: Part 23 - DI Automatic Resolution and Repositories

    01-15-2018 / 7 minutes, 42 seconds
    In this episode, we'll review a few scary terms. But, like with most terminology, the underlying concepts are quite simple. Please note that a solid understanding of dependency injection and Laravel's automatic resolution will be key to your future, as a ...
  • Laravel From Scratch: Part 24 - The Service Container

    Laravel From Scratch: Part 24 - The Service Container

    01-15-2018 / 5 minutes, 40 seconds
    In many ways, the service container is the heart of Laravel. Any and all registered dependencies will be resolved out of it. This includes Laravel's various components, as well as your own. Watch the full series at http://laravelfromscratch.com, or learn ...
  • Laravel From Scratch: Part 25 - Service Providers Explained

    Laravel From Scratch: Part 25 - Service Providers Explained

    01-15-2018 / 7 minutes, 33 seconds
    Service providers represent the building blocks of Laravel. In fact, Laravel, itself, is composed of countless providers that bootstrap themselves into the framework. The same will be true for any package you install, that includes Laravel-specific suppor...
  • Laravel From Scratch: Part 26 - Sending Email

    Laravel From Scratch: Part 26 - Sending Email

    01-15-2018 / 5 minutes, 41 seconds
    You'll very likely need to send email, as part of your application. Perhaps when a new blog post is published, you want to notify your various subscribers. Or, possibly, when a user cancels their account, you'll want to send them a goodbye email. How exac...
  • Laravel From Scratch: Part 27 - Markdown Mail

    Laravel From Scratch: Part 27 - Markdown Mail

    01-15-2018 / 5 minutes, 13 seconds
    So we can now send email, as needed. Excellent! But we're still left in the position of needing to build a nice looking email template. If you've ever had the displeasure of doing this before, you'll know that it's a fairly painful process, due to the var...
  • Laravel From Scratch: Part 28 - Form Requests and Form Objects

    Laravel From Scratch: Part 28 - Form Requests and Form Objects

    01-15-2018 / 5 minutes, 36 seconds
    In most cases, performing your form validation directly in your controller will work beautifully. However, particularly for larger forms with unique validation requirements, you'll likely want to extract this code to a dedicated class. In this episode, we...
  • Laravel From Scratch: Part 29 - Session Handling and Flash Messages

    Laravel From Scratch: Part 29 - Session Handling and Flash Messages

    01-15-2018 / 5 minutes, 45 seconds
    The web is stateless. This means that any set of data won't persist from page to page. It simply disappears. Sessions provide a solution for this fact, by offering a mechanism to maintain state for a particular user across any number of requests. Watch th...
  • Laravel From Scratch: Part - 30 Tags and Pivot Tables

    Laravel From Scratch: Part - 30 Tags and Pivot Tables

    01-15-2018 / 6 minutes, 58 seconds
    It would be nice if we could associate any number of tags with a given post. This is fairly standard for any blogging application. The only problem is that the traditional belongsTo or hasMany relationships that we've learned so far don't quite fit the bi...
  • Laravel From Scratch: Part 31 - Sorting Posts By Tags

    Laravel From Scratch: Part 31 - Sorting Posts By Tags

    01-15-2018 / 6 minutes, 42 seconds
    It's great that we can now associate any post with any tag (via the belongsToMany relationship), but how might we go about allowing the user to filter all posts according to their requested tag name? Watch the full series at http://laravelfromscratch.com,...
  • Laravel From Scratch: Part 32 - Eventing

    Laravel From Scratch: Part 32 - Eventing

    01-15-2018 / 9 minutes, 9 seconds
    If you find that particular classes in your code base have become incredibly complicated, it might be worth considering a general observer model. That way, when a notable event takes place in your system (OrderRefunded, ThreadPublished, etc.), you only ne...
Laravel From Scratch: Part 8 - Controllers
Laravel From Scratch: Part 9 - Route Model Binding
Laravel From Scratch: Part 7 - Eloquent 101
Laravel From Scratch: Part 13 - Rendering Posts
Laravel From Scratch: Part 20 - Archives
Laravel From Scratch: Part 21 - View Composers
Laravel From Scratch: Part 22 - Testing 101
Laravel From Scratch: Part 26 - Sending Email
Laravel From Scratch: Part 27 - Markdown Mail
Laravel From Scratch: Part 32 - Eventing