composer create project laravel/laravel example app
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:
-
Navigate to the composer website and click on download button.
-
Then click on the Composer-Setup.exe link & download the file.
-
Click on the “Install for all users” button in the window popup.
-
Do not click developer mode checkbox & click Next.
-
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.
-
On the proxy setting window popup, do not make any changes and click next.
-
Click on install window in ready to install window without any changes. Wait for installation.
-
Do not make any changes, just leave it & click Next.
-
Click Finish, Composer is installed successfully.
-
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:
- Download the latest version of PHP from the following link:
https://windows.php.net/download/
-
Extract the downloaded file and rename as per your requirement and move to the directory where you want to install PHP.
-
Open the System Properties window by going to the Start menu and searching for "System Properties".
-
Click on the "Advanced" tab and click the "Environment Variables" button.
-
In the "System Variables" section, scroll down to the "Path" variable and click the "Edit" button.
-
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.
-
Click "OK" to close the "Environment Variables" window, and then click "OK" again to close the "System Properties" window.
-
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.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
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.
Random Code Snippet Queries: Laravel
- Laravel 11 step by step instructions to upload file in storage directory and display in blade file
- Credit card validation in laravel
- Get previous date data in laravel
- How to use bootstrap pagination in laravel 8
- Delete records with relationship in laravel
- Laravel upload file with original file name
- Setup laravel project with docker
- Save or update pivot table data with additional column in Laravel
- How to randomly get the user id from users table in laravel
- Retain selected value of select box in Laravel
- Laravel onclick function not working
- How to make Copy or Duplicate table row in laravel
- Get last year created records in Laravel
- Target class [admin] does not exist.
- How to create project_user pivot table in laravel
- How to send email in Laravel 11
- Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
- If condition in foreach loop in laravel
- Comment .env file in laravel
- Insert dummy data in users table Laravel
- Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found
- How to restore deleted records in laravel
- Laravel 10 Breeze Authentication Example
- Route [password.request] not defined
- SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table