Back Button Laravel
What's New in Laravel 5.8

What's New in Laravel 5.8

Laravel 5.8, which released on February 26th, 2019, ships with a new Eloquent relationship, automatic policy discovery, PHPUnit 8 support, and so much more. In this series, one-by-one, we'll dig into the most important updates you need to know about.

Beginner
5 episodes
24:21 mins
5
Latest Episode in This Series

Added 10 months ago

Automatic Event Listener Discovery

My favorite new features are often the ones that streamline your daily workflow. With that in mind,...

Watch
What's New in Laravel 5.8

What's New in Laravel 5.8

Laravel 5.8, which released on February 26th, 2019, ships with a new Eloquent relationship, automatic policy discovery, PHPUnit 8 support, and so much more. In this series, one-by-one, we'll dig into the most important updates you need to know about.

Begin
5
Latest Episode in This Series

Added 10 months ago

Automatic Event Listener Discovery

My favorite new features are often the ones that streamline your daily workflow. With that in mind,...

Watch

Your Teacher | Jeffrey Way

https://pbs.twimg.com/profile_images/1179539487086514177/cl6UdqIS_400x400.jpg's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.
    1. EPISODE 1

      Run Time 5:42

      Free

      First up on the agenda is automatic policy discovery. In past versions of Laravel, each time a policy class is generated, you'd need to visit your AuthServiceProvider to manually wire it up with the appropriate model. It's not the end of the world, but still nonetheless a bit tedious. Now in Laravel 5.8, as long as you follow the standard naming convention, this policy discovery happens automatically.

    2. EPISODE 2

      Run Time 2:41

      Free

      A small, but important breaking change in Laravel 5.8 is the switch from minutes to seconds for all cache TTLs. In your codebase, track down any reference to cache()->put(), cache()->remember(), or any other variants, and do the necessary math to convert the expiration date from minutes to seconds (multiply by 60).

    3. EPISODE 3

      Run Time 1:38

      Free

      Laravel 5.8 ships with a new Postmark mail driver, which is convenient since that's what Laracasts uses for all transactional emails. In this lesson, I'll show you how to create a new Postmark server, and send email through their API...all in one minute.

    4. EPISODE 4

      Run Time 8:08

      Free

      Often, when preparing your tests, you'll need to mock a class, set an expectation, and then update the related instance in Laravel's service container with your mocked version. Laravel 5.8 now ships with two testing helpers to simplify this setup a good bit: $this->mock() and $this->spy().

    5. EPISODE 5

      Run Time 6:12

      Free

      My favorite new features are often the ones that streamline your daily workflow. With that in mind, I'm happy to report that, as of Laravel 5.8.9, Taylor has implemented optional automatic event listener discovery into the framework. Let's review the essentials, as well as how listener classes are discovered behind the scenes.