Chapter 1. Introduction
Introduction
This book is strongly based on Official Laravel's Documentation, so we recommend you to go and take a look.
Install Laravel 12
For Linux/Mac OS
For linux and Mac, you can run this command:
Mac
/bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.4)"
Linux
/bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)"
After this you have to run this command to install requires composer dependencies:
composer global require laravel/installer
For Windows
If you are running windows, you have just to install PHP, then install Composer:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Creating your first Laravel Project.
Creation
laravel new example-app
Start your development environment.
Once you created your first laravel Project, you will be able to execute your laravel server and your vite development server:
npm install && npm run build
composer run dev