Member-only story
Laravel Basic | How to install Laravel 12?
Laravel 12 Installation Guide | Prerequisites & Step-by-Step Setup
2 min read 1 day ago
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