Projects Engine
  • Home
  • Blog
  • Invoice
  • Courses
  • Contact
  • Login
  • Home
  • Laravel
  • Laravel 9 is now released and includes many new features

Laravel 9 is now released and includes many new features

Laravel 9 is now released and includes many new features 2 minutes read

For many years, Laravel has been one of the most popular PHP frameworks. It’s clean, scalable, and has become the de facto framework for PHP developers and businesses. Laravel 9 is the most recent version, and it includes plenty of new features.

Current Laravel releases have been coming every six months in the past, resulting in many queries, nasty remarks, and misunderstandings regarding the new Laravel release schedule. Laravel 9 was published in February 2022, and the framework will now have a 12-month major release cycle.

New Features in Laravel 9

Minimum PHP Requirement

For testing, Laravel 9 requires the most recent versions of PHP 8 and PHPUnit 8. Because Laravel 9 will use the latest Symfony v6.0, which also requires PHP 8, this is the case.

Anonymous Stub Migration

When you perform the famous migration command, Laravel sets anonymous stub migration as the default behavior:

php artisan make:migration

New Query Builder Interface

The new query builder interface for type hinting, refactoring, and static analysis is now available in Laravel 9.

<?php

return Model::query()
	->whereNotExists(function($query) {
		// $query is a Query\Builder
	})
	->whereHas('relation', function($query) {
		// $query is an Eloquent\Builder
	})
	->with('relation', function($query) {
		// $query is an Eloquent\Relation
	});

PHP 8 String Functions

Laravel 9 targets PHP 8, hence this PR was merged, recommending the use of the latest PHP 8 string functions.

Internally in the \Illuminate\Support\Str class, these methods include str_contains(), str_starts_with(), and str_ends_with().

How to Install Laravel 9

You may install and run Laravel 9 on your local machine if you want to start toying with it for development and testing reasons.

composer create-project --prefer-dist laravel/laravel laravel-9-dev dev-develop

laravellaravel9
Facebook Twitter linkedin

Was this article helpful?

Yes No

Post navigation

Previous post
Next post

Subscribe

Subscribe to our mailing list to get the new updates.

Follow us

Latest posts

  • How to create a Log in with GitHub button for users to log in on your website in PHP

    How to create a Log in with GitHub button for users to log in on your website in PHP

    26.03.2023
  • How to modify menu items and menu locations in WordPress in various ways

    How to modify menu items and menu locations in WordPress in various ways

    21.03.2023
  • How to convert an array to a comma-separated list in PHP in various ways

    How to convert an array to a comma-separated list in PHP in various ways

    20.03.2023

Popular posts

  • How to convert an array to a comma-separated list in PHP in various ways

    How to convert an array to a comma-separated list in PHP in various ways

    20.03.2023
  • How to Edit the WooCommerce Single Product Template Programmatically with Examples

    How to Edit the WooCommerce Single Product Template Programmatically with Examples

    13.03.2023
  • How to edit the WooCommerce single product template

    How to Edit the WooCommerce Single Product Template Programmatically

    03.04.2021
Projects Engine
Projects Engine provides code and tutorials for your themes and plugins you need to create remarkable sites on WordPress that will drive your business forward faster. The primary purpose of this site is to give high-quality WordPress tips, tricks, hacks, and other tools to help WordPress developers improve their site(s) and skills. Projects Engine was founded in December 2020 by Dragi Postolovski.
Copyright 2023 Projects Engine
  • Home
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • Courses
  • Dictionary
  • Plugins
  • Contact

Our website uses cookies to improve your experience. Learn more

I understand!