fb

Laravel 10.35 Released

Home Blog Laravel 10.35 Released

Laravel 10.35 Released

Laravel 10.35 Released

The Laravel team rolled out version 10.35, featuring a Blade @use directive, a number abbreviation helper, and the ability to create a secret using artisan down, among other additions. Here are further details on the updates introduced this week:

Blade @use() directive addition:

{{-- Before --}}
@php
use \App\Enums\WidgetStatusEnum as Status;
@endphp
{{-- After --}}
@use('App\Enums\WidgetStatusEnum', 'Status')
@use('App\Models\Bar')  
{{ Status::Foo }}
{{ Bar::first() }}

Simon Hamp's contribution includes a @use() directive, enabling the import of a PHP class into a Blade template without relying on raw PHP tags.

Number abbreviation via Number::abbreviate():

@jcsoriano contributed the Number::abbreviate() class to the newly incorporated Number Class. This class facilitates the creation of human-readable abbreviated numbers.

Number::abbreviate(1_000_000); // "1M"
Number::abbreviate(100_001); // "100K"
Number::abbreviate(100_100); // "100K"
Number::abbreviate(99_999); // "100K"
Number::abbreviate(99_499); // "99K"

--with-secret option in the artisan down command:

Jacob Daniel contribution is the --with-secret option in the artisan down command. This option generates a secret phrase, allowing bypassing of maintenance mode without user-defined input.

Conditionable trait addition to the AssertableJson class:

Khalil Laleh's addition involves the integration of the Conditionable trait into the AssertableJson class. This trait enables assertions based on specific conditions, streamlining the assertion process within the class.

// Before
$response->assertJson(function (AssertableJson $json) use ($condition) {
$json->has('data');
 
if ($condition) {
$json->has('meta');
}
 
$json->etc();
});
 
// After
$response
->assertJson(fn (AssertableJson $json) => $json->has('data'))
->when($condition, fn (AssertableJson $json) => $json->has('meta'))
// ...
;

These are the updates made to Laravel web development. If you need quality services to create an effective, modern, advanced online shop leave your requests. Laravel web development from Devnrise team allows you to solve business problems on the web. We create large portals, develop and promote them.

Our Blog

How ChatGPT Is Transforming SEO and Digital Marketing

ChatGPT and SEO have become integral to modern digital promotion. We are witnessing how artificial intelligence is reshaping the way content is created and how businesses interact with their audiences. However, search engines still evaluate not the tool itself, but the quality of the final output. The key factor remains the value of content for the user. AI enables faster content creation, idea generation, and adaptation of materials to audience search intent. This significantly streamlines workflows and accelerates the launch of new pages.

View More

How to Choose Low-Frequency Keywords and Why They Matter

Finding low-frequency keywords (LF keywords) is a mandatory component of search engine optimization (SEO). It makes it possible to attract targeted traffic to a website and improve its positions in search engines. Unlike high-frequency keywords aimed at a broad audience, low-frequency keywords allow you to respond more effectively to the needs of specific users. How can you identify such keywords correctly, and why is this important?

View More

How to Promote a Website Without Links: Methods of Boosting a Site Without Buying Backlinks

In SEO, it is widely believed that a website needs incoming links to grow and rank high in search engines. However, promotion without them is also possible — and can be just as effective. Let’s explore methods of promoting a website without purchasing links and ways to improve its visibility in search engines.

View More

Let's build an amazing project

Please fill in this short form and we will be in touch with you soon
FOR ANY QUESTIONS
sales@devnrise.com
VISIT US
Head Office in Latvia: Brivibas Street 137B, Riga, Latvia
United Kingdom: Office 2801, 182-184 High Street North, East Ham, London E6 2JA
whatsapp