-
NPM (Node Package Manager)
Download and install Node.js
-
Composer
Download and install Composer
-
PostgreSQL
Download and install PostgreSQL
- Open a database manager (E.G: DBeaver, pgAdmin) or use a terminal.
- Create a new postgres database for your Laravel project.
-
Open a command prompt or terminal.
-
Navigate to the project directory:
cd project-name
-
Run the following command to install PHP dependencies:
composer install
-
Run the following command to install JavaScript dependencies:
npm install
-
Make a copy of the
.env.example
file: -
Open the
.env
file in a text editor and update the following lines to configure your PostgreSQL database connection:DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=your_database_name DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
-
In database.php, change the default connection to postgres
'default' => env('DB_CONNECTION', 'pgsql')
-
Run the following command to generate the application key:
php artisan key:generate
-
Run the following command to create the necessary database tables:
php artisan migrate
-
Run the following command to create to seed the database:
php artisan db:seed
-
Run the following command to build NPM:
npm run dev
-
Open a new terminal and run the following command to start the Laravel development server:
php artisan serve
-
Open your web browser and navigate to
http://localhost:8000
to see your Laravel application in action.