1 of 14

Laravel 5.6

Just a short talk by Max Snow...

2 of 14

3 of 14

A look over the new features

4 of 14

Logging Improvements

Previously there was just one log, everything went into it.

Now the functionality has been greatly extended with… stacks and channels

Allows different types of “things” to be logged to different places

For example, send alerts to loggly, send errors to slack, critical to SMS, and so on

5 of 14

Dynamic Rate Limiting

Previously, the limit was static (ie. compile time hard-coded

Now, the limit can be dynamic (ie. run time, determined however you like).

Laravel example used attribute in eloquent model, but you can essentially make that calculate the limit however you like!

6 of 14

Easily generate UUIDs

Laravel now has UUID Helper methods to easily generate UUIDs

Greatest thing since sliced bread

use Illuminate\Support\Str;

Str::uuid();

Str::orderedUuid();�

7 of 14

Blade Component Aliasing

Alias a component, then use it!

Blade::component('app.components.alert', 'alert');

Then...

@alert(['type' => 'danger'])� Alert! Alert! Alert!�@endalert

8 of 14

Single Server Task Scheduling

Scheduling cronjobs on a load balanced environment with an unpredictable quantity of servers is annoying…

$schedule->command('invoices:charge')� ->daily()� ->at('01:00')� ->onOneServer();

You need to be using the redis or memcached cache driver

There’s also a package called...

dusterio/laravel-aws-worker

Which is pretty good

9 of 14

Sugar & Other various changes

Broadclass Channel Classes - makes broadcast config neater and more concise

API Controller Generation - Creates a controller with API-relevant methods instead of MVC relevant methods

Model Serialization Improvements - Retain objects inside models (such as relationships) across queueing

Eloquent Date Casting - Allows you to format date casts

Argon2 Password Hashing - When using PHP 7.2+, uses the new Argon2 hashing algorithm

Collision Library - Easier debugging of CLI commands

Artisan optimize - Gone! Don’t let it break your deploy scripts

10 of 14

Some Bonus Content...

11 of 14

Have you ever written a CLI script in bash or perl, only to realise it’s getting a bit too big and complicated, and wished you had the libraries, packages and neatness of PHP?

12 of 14

Laravel Zero

...on the other hand, bringing in an entire framework often seems overkill…

Now there’s a happy medium!

Laravel Zero is unofficial and customized version of Laravel optimized for building command-line applications.

13 of 14

Laravel Sydney 2018

October 18-19th at the ICC

14 of 14

Thanks!

Max

https://twitter.com/devopmax

https://maxsnow.me

Don’t email me with Java jobs plz I’m not a Java developer