
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
- Display success message in laravel
- Delete all related comments on deleting a post in Laravel
- Display first n record from collection in laravel view
- Laravel API response format
- How to create project_user pivot table in laravel
- Get comma separated email from input array
- The Pusher library requires the PHP cURL module. Please ensure it is installed
- How to disable timestamps in laravel
- How to add script on specific view file in laravel while extending layout
- Laravel 11 sanctum api authentication example code
- Get last week data in Laravel
- How to call controller function from view in Laravel
- Get today records in Laravel
- Array to string conversion laravel Controller
- Laravel migration add foreign key to existing table
- How to remove package from laravel
- Session Doesn't Work on Redirect
- Redirect to previous page or url in laravel
- The openssl extension is required for SSL/TLS protection but is not available
- How to display HTML tags In Laravel blade
- Call to a member function pluck() on null
- How to upload files to amazon s3 bucket using Laravel
- In order to use the Auth::routes() method, please install the laravel/ui package
- Get duplicate records in laravel
- The use statement with non-compound name 'Auth' has no effect