PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
No Result
View All Result
Home Web Dev

Laravel 8.30 Released | Laravel News

March 5, 2021
in Web Dev
280 12
Laravel 8.23 Released | Laravel News


The Laravel team released 8.30 with the ability to stop a validator on the first failure, a new collection method, a new rate-limiting convenience method for minutes, and the latest changes in the 8.x branch:

Stop on First Failure in Validators

Taylor Otwell contributed the ability to stop on the first validator failure instead of continuing to validate all fields:

$data = ['foo' => 'bar', 'age' => 30];
$validator = Validator::make($data, [
    'foo' => 'required',
    'age' => 'required|min:31',
    'fizz' => 'required',
]);

$validator->stopOnFirstFailure();
$validator->passes(); // false
$validator->errors()->all();
// returns ['age' => 'The age must be at least 31'].

New Contains One Item Collection Method

Joseph Silber contributed a new collection method for asserting if the collection contains one item. It’s syntactic sugar for checking if the collection has one item:

// Manually checking the count
$collection->count() === 1;

collect(['apple'])->containsOneItem(); // true
collect([])->containsOneItem(); // false
collect(['apple', 'orange'])->containsOneItem(); // false

Rate Limiting Per Minutes Helper

Craig Anderson contributed a new perMinutes() function to rate limiting. Rate limiting already contains a perMinute() method, but the new plural version is a convenience method to define to give more granular control:

use IlluminateCacheRateLimitingLimit;

$decayMinutes = 5;
$maxAttempts = 100;

Limit::perMinutes($decayMinutes, $maxAttempts);

You can see the full list of new features and updates below and the diff between 8.29.0 and 8.30.0 on GitHub. The following release notes are directly from the changelog:

v8.30.0

Added

  • Added new line to DetectsLostConnections (#36373)
  • Added IlluminateCacheRateLimitingLimit::perMinutes() (#36352, 86d0a5c)
  • Make Database Factory macroable (#36380)
  • Added stop on first failure for Validators (39e1f84)
  • Added containsOneItem() method to Collections (#36428, 5b7ffc2)

Changed

  • Respect custom route key with explicit route model binding (#36375)
  • Add Buffered Console Output (#36404)
  • Don’t flash ‘current_password’ input (#36415)
  • Check for context method in Exception Handler (#36424)



Source link

Share219Tweet137Share55Pin49

Related Posts

Intrinsic Typography is the Future of Styling Text on the Web
Web Dev

Intrinsic Typography is the Future of Styling Text on the Web

The way we style text hasn’t changed much over the years. There have been numerous advancements to help make...

April 20, 2021
Say Hello To CSS Container Queries
Web Dev

Say Hello To CSS Container Queries

I haven’t been more excited for a CSS feature like I’m now in the past six years I spent...

April 20, 2021
Keep Logs Tidy With the Log Cleaner Package for Laravel
Web Dev

Keep Logs Tidy With the Log Cleaner Package for Laravel

Laravel Log Cleaner is a package by Joost van Veen for keeping your log files small and tidy. While...

April 20, 2021
Making GraphQL Work In WordPress — Smashing Magazine
Web Dev

Making GraphQL Work In WordPress — Smashing Magazine

About The AuthorLeonardo Losoviz is a freelance developer and writer, with an ongoing quest to integrate innovative paradigms (Serverless...

April 20, 2021
Next Post
Laravel is moving to a yearly major release cycle

How the Laravel Release Process Works

How to Install Nvidia Drivers on Linux Mint [Beginner’s Guide]

How to Install Nvidia Drivers on Linux Mint [Beginner's Guide]

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Using serverless backends to iterate quickly on web apps – part 2 : idk.dev

Using serverless backends to iterate quickly on web apps – part 2 : idk.dev

August 24, 2020
The Laravel Octane Beta is Available

The Laravel Octane Beta is Available

April 6, 2021
AWS Chalice Now Supports YAML Templates : idk.dev

AWS Chalice Now Supports YAML Templates : idk.dev

June 16, 2020
Develop an application migration methodology to modernize your data warehouse with Amazon Redshift : idk.dev

Develop an application migration methodology to modernize your data warehouse with Amazon Redshift : idk.dev

July 13, 2020

Categories

  • AWS
  • Big Data
  • Database
  • DevOps
  • IoT
  • Linux
  • Web Dev
No Result
View All Result
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In