The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Laravel 5.6.14 Released

Published on by

Laravel 5.6.14 Released image

Two Laravel releases have shipped this week: Laravel 5.6.13, released Monday, and Laravel 5.6.14, released on Wednesday. The highlight of these releases for me is the new view:cache artisan command and a few new higher order proxies on the collection class.

New Updates in 5.6.14

Laravel 5.6.14 adds SessionGuard::logoutOtherDevices() which invalidates other sessions for the current user. The application must be using the AuthenticateSession middleware.

A SlackMessage::info() method was added. SlackMessage’s default level is info, but this method allows you to be explicit about it.

Various templates and stubs replaced or with the null coalesce operator. If you want more info on removing or in Laravel 5.7, we wrote about updating your blade templates to use the null coalesce operator ahead of time.

New Updates in 5.6.13

I am extremely excited about the new view:cache command added that caches your blade templates, efficiently allowing you the “warm” your template cache during a deploy, for example!

You can update your deployments to run artisan view:cache to preemptively prime your cache instead of cache happening on-the-fly.

The min() and max() are now higher order proxies on collections:

$ tinker
>>> $accounts = collect([
... (object) ['balance' => 100],
... (object) ['balance' => 200]
... ]);
>>> $accounts->max->balance
=> 200

Two new blade directives, @elseauth and @elseguest were added:

@auth('administrator')
@elseauth('standard')
@endauth

The optional helper now has callback support, which lets you pipe the value into an outside function, which also guarantees that you’re not passing the function null. I think this change is explained clearly by looking at the test added with this new feature:

public function testOptionalWithCallback()
{
$this->assertNull(optional(null, function () {
throw new RuntimeException(
'The optional callback should not be called for null'
);
}));
$this->assertEquals(10, optional(5, function ($number) {
return $number * 2;
}));
}

Using optional without a callback continues to work as usual:

optional($userNoAccount->account)->id // null
optional($user->account)->id; // 2

Here’s the full release notes from the Laravel 5.6 changelog:

v5.6.14 (2018-03-28)

Added

  • Added SlackMessage::info() method (#23711)
  • Added SessionGuard::logoutOtherDevices() method (9c51e49)

Changed

  • Replaced Blade’s or operator with null-coalescing operator (13f732e)

Fixed

  • Get Blade compiler from engine resolver (#23710)
  • Default to an empty string when validating the URL signatures (#23721)

v5.6.13 (2018-03-26)

Added

  • Added view:cache command (9fd1273, 2ab8acf)
  • Added min() and max() to as higher order proxies (#23560)
  • Added @elseauth and @elseguest Blade directives (#23569)
  • Added support for hashing configuration (#23573, d6e3ca9)
  • Allow tagged cache keys to be incremented/decremented (#23578)
  • Added SeeInOrder constraint to avoid risky test notices (#23594, ca39449)
  • Support higher order groupBy() (#23608)
  • Support disabling setting created_at in models (#23667)
  • Added callback support to optional() helper (#23688)
  • Added Eloquent\Collection::loadMorph() method (#23626)

Changed

  • Support generating a signed route with a UrlRoutable parameter (#23584)
  • Use DIRECTORY_SEPARATOR in Application::environmentFilePath() (#23596)
  • Support states on model factory after callbacks (#23551, #23676)
  • Use hash_equals() for verifying URL signatures (#23618)
  • Refactored Exceptions/Handler (f9162c9, 6c5d971)
  • Changed status code of InvalidSignatureException from 401 to 403 (#23662, c99911f)

Fixed

  • Revered breaking changes in ManagesLoops (d0a2613)
  • Set exit status in serve command (#23689)
Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Install Laravel Package Guidelines and Skills in Boost image

Install Laravel Package Guidelines and Skills in Boost

Read article
Bagisto Visual: Theme Framework with Visual Editor for Laravel E-commerce image

Bagisto Visual: Theme Framework with Visual Editor for Laravel E-commerce

Read article
Clawdbot Rebrands to Moltbot After Trademark Request From Anthropic image

Clawdbot Rebrands to Moltbot After Trademark Request From Anthropic

Read article
Automate Laravel Herd Worktrees with This Claude Code Skill image

Automate Laravel Herd Worktrees with This Claude Code Skill

Read article
Laravel Boost v2.0 Released with Skills Support image

Laravel Boost v2.0 Released with Skills Support

Read article
Laravel Debugbar v4.0.0 is released image

Laravel Debugbar v4.0.0 is released

Read article