Composer create new laravel project

To create a new Laravel project using Composer, you can follow these steps:

  1. Open your terminal or command prompt.

  2. Navigate to the directory where you want to create your project. For example:

    cd /path/to/projects
  3. Run the following command to create a new Laravel project:

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

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

  4. Composer will download and install the Laravel framework, and then create a new project with the specified name.

  5. Once the installation is complete, you can navigate to the project directory and start working on your Laravel application:

    cd project-name
  6. You can then run the following command to start the development server:

    php artisan serve

    This will start the development server, and you can access your application by navigating to http://localhost:8000 in your web browser.

Note: Make sure you have Composer installed on your system and that you have the correct version of PHP installed. Also, you can specify the version of Laravel you want to use by adding the --version option to the command. For example:

composer create-project --prefer-dist laravel/laravel project-name --version=8.0

This will create a new Laravel 8.0 project.