composer create project laravel/laravel example app

Created at 05-Jan-2023 , By samar

You can use composer create-project --prefer-dist laravel/laravel example-app command in the window terminal to create a laravel app. Before creating your first Laravel project, you should ensure that you have PHP and Composer installed on your system.

After you have installed PHP and Composer, you may create a new Laravel project via the Composer create-project command:

composer create-project --prefer-dist laravel/laravel example-app

This will create a new Laravel project with the latest stable version in a directory called "example-app". If you want to specify a specific version of Laravel to use, you can add the version number after the laravel/laravel portion of the command.

  • Create laravel project with specific version

    To create a new Laravel project with a specific version you have to use composer command.

    First, open a terminal window and navigate to the directory where you want to create your Laravel project. Then, run the following command to create a new Laravel project:

    composer create-project --prefer-dist laravel/laravel=9.0.* laravel-app

    This will create a new Laravel project in a directory with the name laravel-app, and install all of the necessary dependencies for the version 9.0 of Laravel you specified.

  • How to install composer in windows ?

    To install Composer manually on your machine, follow these steps:

    1. Navigate to the composer website and click on download button.

    2. Then click on the Composer-Setup.exe link & download the file.

    3. Click on the “Install for all users” button in the window popup.

    4. Do not click developer mode checkbox & click Next.

    5. First, you have to install PHP on your computer if you have not already installed it . You can see the installation location “c:\xampp\php\php.exe”. Click Next.

    6. On the proxy setting window popup, do not make any changes and click next.

    7. Click on install window in ready to install window without any changes. Wait for installation.

    8. Do not make any changes, just leave it & click Next.

    9. Click Finish, Composer is installed successfully.

    10. Open command prompt & execute the below command :

    You can see your installation is successful.

  • How to install php in windows 10 ?

    To install PHP on Windows 10, follow these steps:

    1. Download the latest version of PHP from the following link:

    1. Extract the downloaded file and rename as per your requirement and move to the directory where you want to install PHP.

    2. Open the System Properties window by going to the Start menu and searching for "System Properties".

    3. Click on the "Advanced" tab and click the "Environment Variables" button.

    4. In the "System Variables" section, scroll down to the "Path" variable and click the "Edit" button.

    5. Click the "New" button and add the path to the PHP installation directory. For example, if you extracted PHP to the "C:\php" directory, you would add "C:\php" to the path.

    6. Click "OK" to close the "Environment Variables" window, and then click "OK" again to close the "System Properties" window.

    7. Open a new terminal window and type the following command to check if PHP is installed:

    php -v

    This should display the version of PHP that you have installed.

Back to code snippet queries related laravel

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.