Laravel 5 Fundamentals
Each year, the Laracasts "Laravel From Scratch" series is refreshed to reflect the latest iteration of the framework. This is the 2015 edition, which uses version 5.0 of the framework.
Hi, I'm Jeffrey. Nice to meet you. So you're new to Laravel and modern PHP development? Interested in a guide, who will steer you through these new waters? Maybe I can help! Learning a framework can be a daunting task, but not to worry: learning Laravel is fun!
Updated Series Available
You are viewing an archived course. We instead recommend that you watch Laravel 5.7 From Scratch.
Progress
Series Info
- Episodes
- 27
- Run Time
- 5h 43m
- Difficulty
- Beginner
- Last Updated
- Nov 11, 2015
- Version
- Latest
Series Episodes
- Episodes (27)
Meet Composer
Before we can get started with Laravel, you'll first need to learn about Composer, which is PHP's premier dependency manager.Virtual Machines and Homestead
If you worked a long with the previous, but hit a roadblock with your PHP installation, you might consider using a virtual machine. Luckily, Homestead has your back here!A Gentle Introduction to Routing, Controllers, and Views
We've waited long enough! Let's see the codebase! In this episode, I'll give you a very gentle introduction to the basics of routing, controllers, and views.Passing Data to Views
So you've learned a bit about registering routes, and dispatching to controller methods, but how exactly do we pass data to our views? Let me show you!Blade 101
Let's switch over to discussing the basics of Laravel's templating engine: Blade. While it's true that PHP, itself, is a templating engine, the truth is that it didn't evolve to become a very good one. Blade will make your life much easier and enjoyable. You'll love it!Environments and Configuration
A good understanding of how Laravel’s configuration process works is vital. Let’s take a few minutes to review the essentials.Migrations
Migrations are one of Laravel’s most powerful features. Think of them as version control for your database. If this concept is new to you, it might sound strange, but, trust me: you’ll love it!Eloquent 101
Now that you've learned a bit about migrations, let's move on to the basics of using Eloquent. You'll love this!Basic Model/Controller/View Workflow
If you've done your homework from the previous episode, you should have a basic familiarity with how to use Eloquent. Let's put that to the test, and create a couple of pages to display some articles.Forms
Forms exist in just about every single web application. Let's review what that looks like in Laravel! Along the way, you'll be introduced to custom packages, service providers, and much more.Dates, Mutators, and Scopes
Before we tackle validation, let's take a break and talk a bit more about dates. In the process, though, we'll have the opportunity to research some nifty Eloquent features, such as mutators, query scopes, and more!Form Requests and Controller Validation
We've waited long enough. Let's review validation in Laravel 5, using two different methods. It's a cinch!View Partials and Form Reuse
Very quickly, you'll find yourself in situations, where you're tempted to copy and paste some form code into a new view. The most common example is for both create and update actions. Resist the urge! Instead, we'll leverage view partials.Eloquent Relationships
An article is written by a user of our application, right? Well, how exactly can we represent these sorts of relationships with Eloquent?Easy Auth
Out of the box, Laravel includes some useful authentication boilerplate to get you up and running as quickly as possible. In this lesson, we'll review this boilerplate, while also touching on a different way to register routes, as well as some more Eloquent training.Ogres Are Like Middleware
Initially, the idea of middleware can be confusing and daunting. Fortunately, once you understand how it all works, it's not too confusing at all!Midterm Review
Think about how much you've learned so far. Before we move ahead with new material, perhaps we should take a short break to review and harness the content from this series so far.Route Model Binding
Route model binding allows us to, very easily, inject model instances into our various controller methods. It's pretty neat; let me show you!Manage Your Assets
Let's take a break from our PHP, and instead focus on asset management. What's the best way to deal with this in a Laravel app? Well, we have you covered. Let's use Gulp and Laravel Elixir.Flash Messaging
Often, you'll want to send a quick notification to the user, when they perform some kind of action in your application. "Good job, your task has been created." Or: "You are now logged out." So it seems that we need a way to store things in the session for just a single request. Let me show you some clean ways to handle this!Many to Many Relations (With Tags)
So far, you've learned about a few important Eloquent relationships. But, there's more! Think about how you might respresent the relationship between an article, and a tag. Hmm... let's figure it out in this episode. In the process, we'll discuss many to many relationships, pivot tables, and more.Selecting Tags From the UI
Now that you understand the basics of many-to-many relationships, how can we orchestrate all of this from our UI? Or, in other words, how do we allow the user to modify which tags are associated with their articles?Syncing Tags
In the last episode, we concluded with a cliffhanger. How do we sync up the tags for each article? Well, I gave you a hint with that keyword, "sync." Let's review the answer in this episode!Enhancing Select Elements
So we've successfully implemented tagging into our app - pretty easily, too! But, if we're honest, it's not too user-friendly. Why don't we take a short recess from discussing the Laravel core, and instead enhance the select dropdown with the excellent Select2 plugin. In the process, this will give us a good opportunity to talk a bit more about performance improvements with Laravel Elixir.When You Want a View Partial to Always Receive Data
One initial gotcha that you'll encounter, when building your first Laravel app, is the need to always make some variable available to a view or view partial. Do you place the binding in your controller method? Well, what about every other route that loads the view? Certainly, the answer isn't to duplicate these bindings all over the place. Instead, we'll make use of view composers.The Service Container
Laravel's service container (also known as the IoC container) takes a bit of time for newcomers to fully understand. However, it's important that you plant your feet and really learn these concepts. They're the bedrock of app development in Laravel.Loose Ends and Wrapping Up
There's always more to learn, but, for your introduction to Laravel, we must unfortunately wrap things up. In this video, we'll take care of any remaining loose ends, while finishing up with a quick review of what you can expect in "Intermediate Laravel," coming March, 2015.
