Before we can get started with Laravel, you'll first need to learn about Composer, which is PHP's premier dependency manager.
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!
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.
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!
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!
A good understanding of how Laravel’s configuration process works is vital. Let’s take a few minutes to review the essentials.
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!
Now that you've learned a bit about migrations, let's move on to the basics of using Eloquent. You'll love this!
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 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.
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!
We've waited long enough. Let's review validation in Laravel 5, using two different methods. It's a cinch!
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.
Along the way, you'll also learn a number of fun things, including resourceful routing, form model binding, generic form requests, and more!
An article is written by a user of our application, right? Well, how exactly can we represent these sorts of relationships with Eloquent?
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.
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!
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 allows us to, very easily, inject model instances into our various controller methods. It's pretty neat; let me show you!
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.
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!
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.
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?
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!
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.
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.
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.
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.