A Complete Guide to Hiring Python Developers
Python is a core programming language, which means it is the standard low-level language that has direct hardware access. Guido Van Rossum, a Dutch programmer, created Python in 1991. It’s…
Laravel development is one of the most desirable frameworks of 2022 with clean codes and functionality. It recently released its latest version, Laravel 9.37 on Oct 26, 2022.
It features verbose view caching CLI output, strict violation handlers, and support for preloading assets with Vite. Before we dive into those elements one by one, let’s take a moment to understand how it all started, and how much the framework has improved since its inception in 2011, eleven years ago.
An open-source web framework written in PHP, Laravel was created by Taylor Otwell in 2011. The idea was to provide an improved alternative to CodeIgniter, a framework that did not feature built-in support for user authentication and authorization.
Some of the notable features and notable features of Laravel 9 are listed below.
Laravel 9 requires PHP 8 for testing since it uses Symfony v6.0. PHP 8 comes with its own improvements and features. Features like JIT compile to constructor property promotion, it is a benchmark PHP version.
This also allowed Laravel 9 to use PHP 8’s string functions like str_starts_with(), str_ends_with(), and str_contains() internally in the \Illuminate\Support\Str class.
To solve the GitHub issue with multiple stub migration, Laravel 9 supports anonymous stub migration. It helps with migration class name collisions, especially when recreating the database.
With Laravel 9, the developers could enjoy type hinting, static analysis, and refactoring with the new query builder interface. Laravel 9 made type hinting highly reliable for refactoring and code completion.
The latest release of Laravel came on Oct 26, 2022, with Laravel 9.37. This framework now supports query builder raw value method, verbose view caching CLI output, handlers for silently discarded and missing attributes, and much more. Here’s each of them in detail.
Laravel 9.37 comes with verbose view caching where developers will now have the ability to pass ‘-v’ to the ‘view:cache’ artisan command to output the directories the command is looking in. ‘-vv’ would be for seeing every file the command caches.
php artisan view:cache -vv
Now, developers will have the ability to register handlers for ‘missing attributes’ and ‘silently discarded’ strict mode violations.
Model::handleMissingAttributeViolationUsing(
function ($model, $key) {
// …
}
);
Model::handleDiscardedAttributeViolationUsing(
function ($model, $keys) {
// …
}
);
With Laravel 9.37, you can pass a callable as the ‘$report’ parameter when you use ‘rescue()’ so you can conditionally report the error depending on the boolean returned.
rescue(fn() => ‘error’, fn() => ‘rescue’, function(Throwable $e){
return $e instanceof SomeException;
});
This feature will improve the loading speed by preloading the critical assets. It is possible with Vite, and this would be the default behavior for Laravel apps using Vite.
With the ‘rawValue()’ method, you can get a value from an SQL expression. Here is an example.
$first = TripModel::orderBy(‘date_at’, ‘ASC’)
->rawValue(‘YEAR(`date_at`)’);
$last = TripModel::orderBy(‘date_at’, ‘DESC’)
->rawValue(‘YEAR(`date_at`)’);
$fullname = UserModel::where(‘id’, $id)
->rawValue(‘CONCAT(`first_name`, ” “, `last_name`)’);
Laravel is an open-source PHP web framework that is ideal to build web applications because of its model–view–controller architectural pattern. With the release of Laravel 9.37, the features of the framework have been polished for the betterment. If you think Laravel is the perfect fit for your project, Infiraise is the perfect place to hire Laravel developers equipped with the latest tools and technologies to meet all your requirements.
Have questions about the latest Laravel Release? We’ve got your covered.
Laravel 9.37 added optional verbose output when caching, closure to rescue report parameters, Vite support for preloading critical assets, and query builder raw value method.
The expectations for output assertion in PendingCommand have been fixed with Laravel 9.37. Moreover, Model:show registering getAttribute() as a null accessor has also been fixed.
Python is a core programming language, which means it is the standard low-level language that has direct hardware access. Guido Van Rossum, a Dutch programmer, created Python in 1991. It’s…
Because of its development architecture, fluidity, expandability, and security features, Magento has emerged as a leading e-commerce platform for both Magento developers and companies. Magento is completely adaptable, allowing developers…
If you’re looking for experienced web designers to help you revitalize your company’s online presence, InfiRaise is the place to go. Our team is well versed with website design and…
Let’s get in touch