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
- Method Illuminate\Http\Request::validated does not exist
- First and last item of the array using foreach iteration in laravel blade
- How to create and run user seeder in laravel
- Trying to get property 'title' of non-object
- Declaration of App\Models\Post::sluggable() must be compatible with Cviebrock\EloquentSluggable\Sluggable
- Insert current date time in a column using Laravel
- Call to a member function pluck() on null
- Print last executed query in laravel
- Laravel create table migration with model
- Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
- Send post data from controller to view
- Get today records in Laravel
- How to return a column with different name in Laravel
- Add class to body in laravel view
- Pagination in laravel
- Split an Eloquent Collection by half in Laravel
- How to use or operator in laravel
- Laravel URL validation not working
- After image selected get validation error in laravel
- How to check if user has created any post or not in laravel
- Pass variable from blade to controller Laravel
- Database transactions in laravel
- Convert multidimensional array to single array in Laravel
- Credit card validation in laravel
- How to check data inserted or deleted in pivot after toggle method