Install New Laravel 11

王林
Release: 2024-07-28 19:15:03
Original
536 people have browsed it

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.

General Steps to Install Laravel 11

  1. 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.

  2. Install Laravel via Composer: Once Composer is installed, you can install Laravel globally by running:

    composer global require laravel/installer
    Copy after login
    Copy after login
  3. Create a New Laravel Project: Navigate to your preferred directory and create a new Laravel project:

    laravel new my-awesome-project
    Copy after login
    Copy after login
  4. Navigate to Your Project Directory:

    cd my-awesome-project
    Copy after login
  5. Serve Your Application: Start the development server:

    php artisan serve
    Copy after login

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
  1. Download LaravelHerd: Get LaravelHerd from here.
  2. Install LaravelHerd: Open the downloaded file and drag LaravelHerd to your Applications folder.
  3. Run LaravelHerd: Open LaravelHerd from your Applications folder.
  4. Use General step to deliver your own Laravel Applications.
Linux/WSL2: Using LAMP Stack
  1. Install LAMP Stack: Follow the instructions on DigitalOcean to install the LAMP stack.
  2. Install Composer:

    sudo apt update sudo apt install composer
    Copy after login
  3. Install Laravel via Composer:

    composer global require laravel/installer
    Copy after login
    Copy after login
  4. Create a New Laravel Project:

    laravel new my-awesome-project
    Copy after login
    Copy after login
  5. Serve Your Application:

    cd my-awesome-project php artisan serve
    Copy after login
Windows: Using Laragon
  1. Download Laragon: Get Laragon from here.
  2. Install Laragon: Run the installer and follow the instructions.
  3. Run Laragon: Open Laragon.
  4. Create a New Laravel Project: Use Laragon’s quick app feature to create a new Laravel project.
  5. 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:

  • https://laravel.com/docs/11.x
  • https://herd.laravel.com/
  • https://laragon.org/download/
  • https://www.digitalocean.com/community/tutorials/how-to-install-lamp-stack-on-ubuntu

The above is the detailed content of Install New Laravel 11. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!