Member-only story

Laravel Basic | How to install Laravel 12?

Laravel 12 Installation Guide | Prerequisites & Step-by-Step Setup

Raviya Technical
2 min read1 day ago

Prerequisites

Before you install Laravel 12, ensure you have the following prerequisites installed on your machine:

  1. PHP: Laravel 12 requires PHP 8.2 or higher.
  2. Composer: Laravel uses Composer to manage its dependencies.
  3. Node: npm uses for frontend manage its dependencies.
  4. Web Server: Apache or Nginx is recommended.
  5. Database: MySQL, PostgreSQL, SQLite, or SQL Server.

New Method for install using laravel

composer global require laravel/installer

Create A project

laravel new example-app

Or Local method using composer (Alway install latest version)

composer create-project laravel/laravel example-app

If a database configuration is provided, it will be used; otherwise, SQLite will be used with the database located at database/database.sqlite.

.env (MySQL)

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

Also install fronted using npm

npm install && npm run build

--

--

No responses yet