Laravel Project Setup Guide (Cloning from Git)
Prerequisites
Before you begin, ensure the following tools are installed on your system:
-
Git
Git is a version control system used to track code changes.
Download: https://git-scm.com/
Check:git --version
-
PHP (>= 7.3)
Laravel requires PHP 7.3 or higher.
Check:php -v
-
Composer
Composer is a dependency manager for PHP.
Download: https://getcomposer.org/
Check:composer --version
-
Web Server
-
Use Laravel’s built-in server for local development.
-
Use Apache or Nginx for production.
-
-
Database
Ensure your system has the required DBMS (MySQL, PostgreSQL, SQLite, etc.)
Clone & Set Up Laravel Project
1. Clone the Repository
Open your terminal and navigate to the directory where you want to clone the project, then run:
git clone https://gitlab.com/SoengSouy/hr_ms_laravel8.git
Replace the URL with your actual repository if needed.
2. Navigate into the Project Directory
cd hr_ms_laravel8
3. Install Composer Dependencies
composer install
This will install all the required PHP packages.
4. Copy the Environment File
cp .env.example .env
Then, open the .env
file and configure your database settings:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_db DB_USERNAME=root DB_PASSWORD=your_password
5. Generate Application Key
php artisan key:generate
This sets the APP_KEY
in your .env
file.
6. Run Database Migrations
php artisan migrate
This command creates the necessary tables in your configured database.
7. Serve the Application
php artisan serve
Visit your application at:
http://localhost:8000
You’re All Set!
You now have a working Laravel application cloned and running locally. Let me know if you want to add:
-
Authentication (login/register)
-
Admin dashboard
-
CRUD functionality
-
API integration