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.
General Steps to Install Laravel 11
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
Recommended Tools for Different Operating Systems
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 |
Detailed Steps for Each Operating System
macOS: Using LaravelHerd
- Download LaravelHerd: Get LaravelHerd from here.
- Install LaravelHerd: Open the downloaded file and drag LaravelHerd to your Applications folder.
- Run LaravelHerd: Open LaravelHerd from your Applications folder.
- Use General step to deliver your own Laravel Applications.
Linux/WSL2: Using LAMP Stack
- Install LAMP Stack: Follow the instructions on DigitalOcean to install the LAMP stack.
-
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
Windows: Using Laragon
- Download Laragon: Get Laragon from here.
- Install Laragon: Run the installer and follow the instructions.
- Run Laragon: Open Laragon.
- Create a New Laravel Project: Use Laragon’s quick app feature to create a new Laravel project.
- Serve Your Project: Laragon will automatically serve your Laravel application.
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:
Top comments (2)
We're waiting
Here's the new update for the content, enjoy. Happy Coding!