Member-only story
Laravel Basic | How to install Laravel 12?
Laravel 12 Installation Guide | Prerequisites & Step-by-Step Setup
Prerequisites
Before you install Laravel 12, ensure you have the following prerequisites installed on your machine:
- PHP: Laravel 12 requires PHP 8.2 or higher.
- Composer: Laravel uses Composer to manage its dependencies.
- Node: npm uses for frontend manage its dependencies.
- Web Server: Apache or Nginx is recommended.
- 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
Start Server using new command 😁
composer run dev
Both run in same time npm run dev and php artisan serve etc
Welcome to New page of laravel 12

Did you know you can clap multiple times? 🥰 If this story added value to your day, please show your support by giving it a 👏 clap, sharing it with others, or even sponsoring my work. Your appreciation means the world to me!