Home >Backend Development >PHP Tutorial >Install New Laravel 11
So, you're ready to dive into the world of Laravel 11? Awesome choice! Laravel is a powerful PHP framework that makes web development a breeze. Let's break down the installation process in a way that's easy to understand and follow, no matter your operating system.
Install Composer: Laravel uses Composer to manage its dependencies. You need to have Composer installed on your system. You can download it from getcomposer.org.
Install Laravel via Composer: Once Composer is installed, you can install Laravel globally by running:
composer global require laravel/installer
Create a New Laravel Project: Navigate to your preferred directory and create a new Laravel project:
laravel new my-awesome-project
Navigate to Your Project Directory:
cd my-awesome-project
Serve Your Application: Start the development server:
php artisan serve
Let's look at specific tools and setups for macOS, Linux (using WSL2 for Windows users), and Windows.
Operating System | Recommended Tool/App | Link |
---|---|---|
macOS | LaravelHerd | herd.laravel.com |
Linux/WSL2 | LAMP Stack | digitalocean.com |
Windows | Laragon | laragon.org |
Install Composer:
sudo apt update sudo apt install composer
Install Laravel via Composer:
composer global require laravel/installer
Create a New Laravel Project:
laravel new my-awesome-project
Serve Your Application:
cd my-awesome-project php artisan serve
That's it! You've got Laravel 11 up and running on your machine. Whether you're on macOS, Linux, or Windows, these tools make the process smooth and straightforward. Happy coding!
Reference:
The above is the detailed content of Install New Laravel 11. For more information, please follow other related articles on the PHP Chinese website!