What's new

Composer

Crypto Pitt

Forum Guru
Elite
Joined
Nov 19, 2020
Posts
2,683
Reaction
4,446
Points
1,546
I have a folder which contains a laravel project. I want it to run to my newly installed VScode, what are the complete steps to make it run?
 
To run your Laravel project in VScode, you need to follow these steps:

1. Open VScode and install the PHP extension. You can do this by clicking on the extensions icon on the left-hand side of the window, searching for "PHP" and clicking install.

2. Install the Laravel extension for VScode. In the same extensions tab, search for "Laravel" and click install.

3. Open your Laravel project in VScode by clicking on the "Open Folder" button on the welcome screen or by going to File > Open Folder and selecting your Laravel project folder.

4. Open a terminal window within VScode by going to View > Terminal or by using the keyboard shortcut Ctrl+Shift+~

5. Run the following command in the terminal to install the required dependencies:

Code:
   composer install

6. Create a .env file by running the following command in the terminal:

Code:
   cp .env.example .env

This command creates a copy of the .env.example file and renames it to .env. This file contains your application's environment variables.

7. Generate a new application key by running the following command in the terminal:

Code:
   php artisan key:generate

This command generates a new application key which is used for encrypting data.

8. Finally, start the development server by running the following command in the terminal:

Code:
   php artisan serve

This command will start the development server at http://localhost:8000.

You can now access your Laravel application by opening your web browser and going to http://localhost:8000.
 

Similar threads

Back
Top