Categories: Laravel
Tags:

To install Laravel 11 on your XAMPP setup, follow these steps:
Prerequisites

XAMPP Installed: Ensure that XAMPP is running, and your PHP version is at least 8.2 since Laravel 11 requires PHP 8.2 or higher. Composer Installed: Laravel uses Composer as a dependency manager. If you don’t have it installed, download and install Composer.

Steps to Install Laravel 11

Open Terminal (Command Prompt or Git Bash): Navigate to your htdocs directory where you want to install Laravel by running:

cd C:/xampp/htdocs

Create a New Laravel Project: Use Composer to create a new Laravel 11 project. Run the following command:

composer create-project --prefer-dist laravel/laravel="11.*" school-erp

Set Up the .env File: After installation, navigate into the project directory:

cd school-erp

Then copy the .env.example file to create your .env file:

cp .env.example .env  // or copy .env.example .env

Open the .env file and configure your database settings (MySQL is used with XAMPP):

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

Make sure to replace your_database_name with the name of the database you’ll create for your ERP system.

Generate an Application Key: Run the following command to generate a key for your application:

php artisan key:generate

Run the Laravel Development Server: Finally, you can run the Laravel server with:

php artisan serve

You can now access your Laravel application at:

http://localhost:8000

Additional Setup (Optional)

Database Setup: Create a MySQL database using phpMyAdmin (http://localhost/phpmyadmin) with the same name as defined in your .env file.
Migrations: If you have migrations defined, you can migrate the database structure:

php artisan migrate

Your Laravel 11 application is now set up and ready for development of the school ERP!