Back Button Laravel

What's New in Laravel 5.3

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 lot! From directory changes, to notifications, to passports, to everything in between!

This series will be refreshed every work day, so don't fall behind!

18 episodes
2:43:50 hrs
Start Series
    1. Let's start off with some of the smaller changes, and then work our way up to the big additions! To begin you'll notice that your main directory structure is slightly different! A new routes folder at the top level? And what happened to the events, listeners, jobs, and policies folders? What's going on!?

    2. We're still taking it slow. What kind of series would it be if we discussed the coolest additions first? up, we have a small, but important change to be aware of. As of 5.3, all query builder calls will return collection objects, rather than arrays. If you think about it, this will make the general Laravel API more consistent, as relevant Eloquent calls already return collection objects.

    3. Run Time 3:20 Free

      In this episode, I'll introduce you to a funky little new cache global function (gasp!) in 5.3, written by yours truly.

    4. Run Time 10:11 Free

      In Laravel 5.3, the framework makes a light suggestion on a practical JavaScript setup, using Vue. Have a look at your resources/assets/js folder to check it out. It's important to note, however, that this is all entirely optional. If you prefer Ember or Backbone, delete the contents of your main app.js entry point, and you're good to go! It's only a suggestion.

    5. Run Time 3:32 Free

      Out of the box in Laravel 5.3, pagination will still feel very similar to you. However, should you need to modify the underlying HTML, the process is now significantly easier. In fact, you'll find that the process is very similar to how it was in Laravel 3!

    6. Run Time 8:02 Free

      Laravel 5.3 "mailables" are thin wrappers around the traditional syntax for sending mail. I think you'll find that they're easier to work with, and much easier on the eyes. Let me show you the essential in this episode.

    7. This next addition to Laravel 5.3 is a small, but useful one. When using the foreach or forelse Blade directives, you'll now have a new $loop object available to each iteration. This will provide useful information about the loop, including the current index, if it's the first or last item, if there are remaining iterations for the loop, and more.

    8. Run Time 4:14 Free

      In Laravel 5.3, you'll find a new toggle() method on all belongsToMany relationships. This solves the issue of needing to delete a pivot table record if it exists, or adding it if it doesn't. As an example, consider needing to toggle a user's "like" status for a post.

    9. Run Time 11:16 Free

      Notifications in Laravel 5.3 are incredible. Create a single a notification class, and then designate one or more distribution channels to use - such as email, SMS, Slack, and more. I think you'll really like this new component, so let's take a few episodes to review all of its functionality. We'll start with basic email notifications, and review the nice, fluent API for rapidly building up messages.

    10. Run Time 15:51 Free

      Let's move on and review the database channel for sending notifications. With this approach, any notification you send will be stored in the database, at which point you can fetch them and display them for the user. In this episode, we'll review the entire process - while also leveraging polymorphism to render each notification type within our views as cleanly as possible.

    11. Let's learn how to use Laravel 5.3's Slack notification channel to notify us, the administrator, each time a payment is processed in our application. As you'll quickly see, it's all a cinch!

    12. Run Time 10:02 Free

      Admit it: you always have to do a bit of research to remind yourself how to upload files, determine the temporary folder, guess the file extension, etc. Well now, I promise: you won't forget. In Laravel 5.3, the UploadedFile instance offers a new store() method for rapidly saving files - even all the way to S3 (as we'll do in this video).

    13. Run Time 14:49 Free

      Want to setup an OAuth2 server with API authentication in minutes, instead of days? Well, you're in luck. Laravel Passport has your back! In this episode, Taylor Otwell, himself, stops by to show you the goods.

    14. Run Time 7:30 Free

      Closure-based commands are a useful alternative to generating full Artisan command classes. You'll find that this approach is quite similar to how you do your routing (closures vs. controller classes). Want to pass a simple closure to handle a command? Well now you can!

    15. Laravel Scout is a driver-based solution for performing advanced, full text search on your Eloquent models. Out of the box, it comes with support for Algolia, which offers a fantastic service. In this episode, we'll learn how to set everything up, and send a table full of records to Algolia. For the more curious among you, we'll also, toward the end of the video, dig into the guts of Scout to figure out how everything is put together behind the scenes.

    16. Now that you understand how to setup and import your Eloquent records, let's figure out how to query them. You'll find that Scout attaches a global query scope to your models, which adds a useful searchable() method. While we're reviewing this, we'll also take some time to review custom rankings with Algolia.

    17. Run Time 11:22 Free

      In Laravel 5.3, a number of facades provide a static fake method that can be called to replace the underlying class with a minimal fake version, for the purposes of testing. A fake is a type of test double, where you create a light, barebones implementation of a particular API or interface in order to satisfy or assist a given test.

      Consider a scenario where the code you're testing fires an event. Well, it's possible that you don't want the associated event listeners to be triggered, as part of that test. Instead, we can use a double: replace the underlying event dispatcher with a fake version. Now, we can assert that the necessary event was triggered, without worrying about any of the side effects from firing an actual real event. It sounds complicated, but I assure you that it's all very simple.

    18. Run Time 14:36 Free

      Imagine that you need to define a validation rule which specifies that the provided email address must be unique on the users table, limited to the email column, where the person's active status is set to true, but excluding the current user's email address. As you may know, traditionally, we must provide a comma separated list within a string for all of these parameters. It's pretty rough! But not anymore. Now, in Laravel 5.3, you can use the useful Rule class to fluently build up these constraints.

You May Also Enjoy...

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