
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
- How to display order by null last in laravel
- Define variable and use in Laravel controller method
- Declaration of App\Models\Post::sluggable() must be compatible with Cviebrock\EloquentSluggable\Sluggable
- Show old value while editing the form in Laravel
- How to create new user without form submission in laravel
- If condition in foreach loop in laravel
- Remove several global scope from query
- Get last record from table in laravel
- After image selected get validation error in laravel
- Generate random string lowercase in Laravel
- How to get file extension from input type file in laravel
- How to get all posts which contains comments in laravel
- The Pusher library requires the PHP cURL module. Please ensure it is installed
- Comment .env file in laravel
- Laravel 7 login error message not showing
- Get domain name in laravel
- Call to undefined method Illuminate\Support\Facades\Request::all()
- Argument 1 passed to App\Http\Controllers\Auth\LoginController::authenticated() must be an instance of App\Http\Controllers\Auth\Request
- Display data in table using foreach in Laravel
- Return redirect laravel not working
- 419 page expired error in Laravel
- Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length()
- FirstOrCreate() Not Inserting Model
- Page loader in laravel
- How to create projects method with belongstomany relationship in user model