Prerequisites
Before setting up the Laravel project, ensure the following tools are installed on your system:
-
Git: Version control system.
👉 Download: https://git-scm.com -
PHP: Laravel requires PHP 7.3+.
👉 Check version: -
Composer: PHP dependency manager used to install Laravel packages.
👉 Download: https://getcomposer.org -
Web Server: Use Apache or Nginx for production. Laravel’s built-in server is sufficient for development.
-
Database: Ensure a DBMS like MySQL, PostgreSQL, or SQLite is installed, depending on your project.
Steps to Clone and Set Up a Laravel Project
1. Clone the Repository
Open your terminal and run:
Replace the URL with your repository link if different.
2. Navigate into the Project Directory
3. Install Composer Dependencies
4. Create the .env
File
Then edit .env
and update your environment settings (especially the database section).
5. Generate the Application Key
6. Configure Database in .env
Update these values in .env
:
7. Run Migrations
8. Serve the Application
Visit: http://localhost:8000