Code to install new laravel via cmd

To install a new Laravel project via the command line, you can use the following command:

composer create-project --prefer-dist laravel/laravel project-name

Replace project-name with the name you want to give your project.

Here's a breakdown of the command:

When you run this command, Composer will download the Laravel framework and create a new project with the specified name. The project will be created in a new directory with the same name.

For example, if you run the command composer create-project --prefer-dist laravel/laravel my-new-project, Composer will create a new directory called my-new-project with the Laravel framework installed.

Note: Make sure you have Composer installed on your system and that you are running the command in a directory where you have write permissions.