My Blog Posts

Laravel 6.12.0 Released

Laravel 6.12.0 Released


This version creates syntax contributions for repetitive things such as filtering a request entry as Boolean.

Here are some of the highlights:

Packing

Gergo D. Nagy requested a pick to install factory files to a service provider. Packages can be loaded from a package instead of repackaging existing factories:

From a service provider...
$this->loadFactoriesFrom('source/database/factories');

$this->loadFactoriesFrom([
    'source_one/database/factories', 
    'source_two/database/factories',
]);

Str :: isUuid () 

@leonhh, the current UUIDs from the property used isUuid() by extracting logic string helper contributed ValidatesAttributes:

Returns true
Str::isUuid('a0a2a2d2-0b87-4a18-83f2-2529882be2de');

Returns false
Str::isUuid('laravel');

Boolean Method 

Lasse Rafn to determine whether the value is boolean Request::boolean() fielding and filtering input method created filter_varHere are some examples:

$request = Request::create('/', 'GET', [
    'example1' => 'true',
    'example2' => 'false',
    'checked' => 1,
    'checked2' => '1',
    'unchecked' => 0,
    'unchecked2' => '0',
    'name' => 'Jane Doe'
]);

$request->boolean.'example1'); True
$request->boolean.'example2'); False
$request->boolean.'checked'); True
$request->boolean.'checked2'); True
$request->boolean.'unchecked'); False
$request->boolean.'unchecked2'); False
$request->boolean.'name'); False

createMany ()

Mohamed Benhida createMany() created method that helps create multiple records with custom data :

Before
factory(User::class)-create([
    'name' => 'Taylor',
]);

factory(User::class)-create([
    'name' => 'John',
]);

After
factory(User::class)->createMany([
    ['name' => 'Taylor'],
    ['name' => 'John'],
]);

At GitHub full list of new features and updates and 6.11.0 to 6.12.0 Between Differences Below can see . GoHub all release notes for Laravel 6.0 v6 change log :

Added

Fixed

  • Fixed Cache\RedisLock::acquire() # 31168 , 8683a3d )
  • Fixed database url parsing for unspecified links to the database ( # 31185 )

Optimization

  • Fixed memory usage when downloading large files ( # 31163 )

Updated

  • When used change the Event Dispatcher in the resolved cache stores Event::fake()# 31119 , 0a70beb )



Share this article


Comments (0)

Comment