This document provides instructions for setting up and configuring the project environment for the HR management System project. It includes steps for installing dependencies, configuring the environment, running migrations, and starting the development server.
Before setting up the project, ensure that the following prerequisites are met:
- PHP >= 7.4
- Composer
Follow these steps to set up the project:
-
Clone the Repository: Clone the project repository from the GitHub repository using the following command:
git clone <repository-url>
-
Install Dependencies: Navigate to the project directory and install PHP dependencies using Composer:
cd project-directory composer install
-
Environment Configuration: Create a copy of the
.env.example
file and name it.env
. Update the configuration variables in the.env
file according to your environment settings, including database credentials and application key.cp .env.example .env
-
Generate Application Key: Generate an application key for the Laravel application using the following command:
php artisan key:generate
-
Database Setup: Create a new database for the project and update the database configuration in the
.env
file with the appropriate credentials. -
Database Connection Details
- Database System: PostgreSQL
- Host: 127.0.0.1
- Port: 5432
- Database Name: hr_management
- Username: postgres
- Password: *****
-
Run Migrations: Run database migrations to create the necessary tables in the database:
php artisan migrate
-
Start Development Server: Finally, start the development server to run the Laravel application locally:
php artisan serve
-
Access the Application: Open a web browser and navigate to the URL provided by the
php artisan serve
command to access the application. -
to run the migration and seeder:
php artisan migrate --seed
## Testing
To run tests for the project, execute the following command:
```bash
php artisan test