Git Clone in Laravel ​9 | Sample Template

Git Clone in Laravel ​9 | Sample Template

Laravel 9 Installation

This tutorial will walk you through setting up a Laravel 9 project from a Git repository. Before getting started, ensure you have the following prerequisites installed:

Requirements
  • PHP 8.0.2+

  • MySQL

  • Composer (PHP package manager)

  • Git

Instructions

Step 1: Clone the Laravel Project

Open your terminal and run:

git clone https://gitlab.com/SoengSouy/laravel9_template_sample.git

Navigate to the cloned project:

cd laravel9_template_sample

Step 2: Install Dependencies

Run the following command to install all necessary PHP dependencies:

composer update

Step 3: Configure Environment Variables

Copy the .env file:

cp .env.example .env

Then, open the .env file and update your database and mail settings.

Database Configuration:

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=root DB_PASSWORD=your_database_password

Mail Configuration (for password reset, etc.):

MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=your_email@gmail.com MAIL_PASSWORD=your_email_password MAIL_ENCRYPTION=tls

Step 4: Generate App Key

Run the following to generate your application key:

php artisan key:generate

Step 5: Run Migrations

Create all necessary tables in your database:

php artisan migrate

Step 6: Start Laravel Server

Finally, serve your Laravel app locally:

php artisan serve

Visit your application in your browser:

http://localhost:8000
Souy Soeng

Souy Soeng

Our website teaches and reads PHP, Framework Laravel, and how to download Admin template sample source code free. Thank you for being so supportive!

Github

4 Comments

CAN FEEDBACK
  1. Anonymous
    Anonymous
    After setup project i try signup and user is created but when try login page is blank

    • Souy Soeng
      Souy Soeng
      check file .env add APP = login_nornmal
  2. Anonymous
    Anonymous
    after login, the page is blank. i am not sure it's redirecting to the correct controller
  3. mOnde
    mOnde
    same issue after logging in it redirects to blank page. Also "check file .env add APP = login_nornmal" this doesnt work.
close