9951 explained code solutions for 126 technologies


php-laravelHow do I install Laravel using PHP?


Installing Laravel using PHP is a relatively easy process.

  1. First, you need to make sure you have the necessary dependencies installed. This includes PHP 7.2 or higher, along with the OpenSSL, PDO, Mbstring, Tokenizer, XML, and Ctype PHP extensions.

  2. Next, you need to download the Laravel installer using Composer. You can do this by running the following command in your terminal:

composer global require laravel/installer
  1. After the Laravel installer is installed, you can create a new project using the laravel new command. For example, to create a project called "myproject", you would run the following command:
laravel new myproject
  1. Once the project is created, you can move into the project directory and start the development server using the php artisan serve command. This will start a development server at http://localhost:8000:
cd myproject
php artisan serve
  1. Finally, you can access your project in your web browser at http://localhost:8000.

Helpful links

Edit this code on GitHub