Laravel 5.6.4 Released

Published on by

Laravel 5.6.4 Released image

Laravel 5.6.4 was released yesterday, with highlights including support for callbacks as custom log drivers and a Blade method for include aliases.

As of 5.6, you can define a custom logger using __invoke() as follows:

'channels' => [
'custom' => [
'driver' => 'custom',
'via' => App\Logging\CreateCustomLogger::class,
],
],

Now in Laravel 5.6.4, it’s possible to define a custom channel with a callable in the config/logging.php config file:

'channels' => [
'custom' => [
'driver' => 'custom',
'via' => [App\Logging\MyCustomLogger::class, 'make'],
],
],

With a static function:

<?php
 
namespace App\Logging;
 
use Monolog\Logger;
 
class MyCustomLogger
{
public static function make(array $config)
{
return new Logger(...);
}
}

Also added is a Blade::include() for include aliases. Take the following template for example:

<input type="{{ $type ?? 'text' }}">

With the following include:

Blade::include('includes.input');

And finally, here’s how you can use it:

@input(['type' => 'email'])

Here are the full release notes from the Laravel 5.6 changelog:

v5.6.4 (2018-02-21)

Added

  • Added the ability to set message ID right hand side (#23181)
  • Support callbacks as custom log drivers (#23184)
  • Added Blade::include() method for include aliases (#23172)
  • Added broadcastType() method to notifications (#23236, 4227bd7)

Changed

  • Moved clone logic from FormRequestServiceProvider to Request (b0c2459)
  • Changed pagination arrow symbols (#23127)
  • Update React version in preset (#23134)
  • Added an empty error bag when rendering HTTP exception views (#23139)
  • Normalized actions when using route:list command (#23148)
  • Updated required Carbon version (201bbec)
  • Improved BadMethodCallException messages (#23232)
  • Support date validation rules when comparison has relative time (#23211)

Fixed

  • Returns same Logger instance from LogManager (#23118)
  • Register missing hash.driver DI (#23114)
  • Fixed an issue with starting two database transactions in tests (#23132)
  • Don’t replace tightenco/collect (#23147, #23153, #23160)
  • Catch InvalidFileException when loading invalid environment file (#23149, 5695079)
  • Fixed an issue with assertRedirect() (#23176)
  • Fixed dropdown accessibility (#23191)
  • Fixed --force flag on GeneratorCommand (#23230)

Removed

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
No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project.

Visit No Compromises
Laravel Forge logo

Laravel Forge

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

Laravel Forge
Tinkerwell logo

Tinkerwell

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

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
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
Bacancy logo

Bacancy

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

Bacancy
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
Larafast: Laravel SaaS Starter Kit logo

Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes. Available with VILT and TALL stacks.

Larafast: Laravel SaaS Starter Kit
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a 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
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Apply Dynamic Filters to Eloquent Models with the Filterable Package image

Apply Dynamic Filters to Eloquent Models with the Filterable Package

Read article
Property Hooks Get Closer to Becoming a Reality in PHP 8.4 image

Property Hooks Get Closer to Becoming a Reality in PHP 8.4

Read article
Asserting Exceptions in Laravel Tests image

Asserting Exceptions in Laravel Tests

Read article
Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4 image

Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4

Read article
Basset is an alternative way to load CSS & JS assets image

Basset is an alternative way to load CSS & JS assets

Read article
Integrate Laravel with Stripe Connect Using This Package image

Integrate Laravel with Stripe Connect Using This Package

Read article