Laravel 5.6
Just a short talk by Max Snow...
A look over the new features
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
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!
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();�
�
Blade Component Aliasing
Alias a component, then use it!
Blade::component('app.components.alert', 'alert');
Then...
@alert(['type' => 'danger'])� Alert! Alert! Alert!�@endalert
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
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
Some Bonus Content...
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?
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.
Laravel Sydney 2018
October 18-19th at the ICC
Thanks!
Max
https://twitter.com/devopmax
https://maxsnow.me
Don’t email me with Java jobs plz I’m not a Java developer