Skip to content

cygon23/Ecommarce-Ishi-web

Repository files navigation

Laravel Project Setup Guide

Introduction

This guide provides a step-by-step process to set up and run the Laravel project. Ensure you have the required prerequisites installed before proceeding.


Prerequisites

  • PHP (>= 8.1)
  • Composer (latest version)
  • MySQL or any other database supported by Laravel
  • Node.js (>= 16.x) and npm/yarn
  • Laravel installer (optional)

Installation Steps

1. Clone the Repository

git clone <repository_url>

Replace <repository_url> with your project's Git repository URL.

Navigate to the project directory:

cd <project_directory>

2. Install Dependencies

Run the following command to install PHP dependencies:

composer install

3. Set Up Environment File

Copy the .env.example file to .env:

cp .env.example .env

Open the .env file and configure the following settings:

  • Database Connection: Update the DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD fields.
  • App Key: Generate a unique application key by running:
    php artisan key:generate

4. Run Database Migrations

Run the following command to migrate the database schema:

php artisan migrate

If you have seeders, run:

php artisan db:seed

5. Install Frontend Dependencies

Install the Node.js dependencies:

npm install

Build the frontend assets:

npm run dev

For production builds:

npm run build

6. Start the Development Server

Run the Laravel development server:

php artisan serve

The application will be accessible at http://127.0.0.1:8000.


Additional Commands

  • Clear Cache:

    php artisan cache:clear
    php artisan config:clear
    php artisan route:clear
    php artisan view:clear
  • Storage Link:

    php artisan storage:link
  • Run Tests:

    php artisan test

Troubleshooting

  1. Ensure all prerequisites are installed and configured correctly.
  2. Verify that your .env file is properly set up.
  3. Check file permissions for storage and bootstrap/cache directories:
    chmod -R 775 storage bootstrap/cache
  4. Review the logs in storage/logs/laravel.log for detailed error messages.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors