How to install Laravel with Composer

With the rapid development in the world of manufacturing websitethen it is not impossible if Web framework will continue to grow and have several variants of programming languages ‚Äč‚Äčthat can be used in any manufacturer and one of them is frame what is discussed in this article is Laravel.

Laravel is frame PHP-based and well known to many people for its wide range of functions and ease of manufacture for users familiar with the PHP programming language.

Also read:How to upload a Laravel based website to 000webhost

1. For the Laravel installation, first make sure that you have a XAMPP or WAMP server web server application and a PHP package management application on your operating system.

Download XAMPP

Download the WAMP server

For Windows we can use the Composer application as it is easy to use and compatible with Surroundings by Laravel. For those who don’t have a composer.

Download composer

For Linux, make sure that the PHP available in the operating system contains a cURL component. If it already exists, we can download and install Composer on Linux by entering the following command in Terminal:

curl -sS | sudo php -- --install-dir=/usr/local/bin --filename=composer

For macOS like Linux, make sure PHP is available and has a cURL component. If so, the next step is to download Composer and install it in macOS by typing the following command in Terminal:

curl -sS | phpmv composer.phar /usr/local/bin/composer

2. To make sure Composer is installed, enter the command composer in your command prompt or your terminal. Once installed, Composer will display basic information in the form of the version and usage of the Composer application.

3. The next step is to download Laravel with the composer pre-installed. First, point to the file server directory using the command prompt or terminal.

  • If we use the XAMPP web server, automatically Originally the file server directory is in the directory xampp / htdocs .
  • If we use the WAMP server web server, the file server directory is located in the directory by default wamp / www .
  • For other web servers, customize the file server location guide for each web server.

4. If so, then the next step is to make a request to get (and install) the Laravel file that was hosted in the Github repository by entering the following command in the command prompt or terminal:

composer create-project --prefer-dist laravel/laravel nama_proyek_kamu

When we want to make a request by specifying a specific version of Laravel, enter the following command in the command prompt or terminal:

composer create-project laravel/laravel="5.5.*" nama_proyek_kamu

When the command is entered successfully, Composer will begin fetching data and installing Laravel in the directory we specified. Make sure the internet connection is stable so there are no disruptions during the Laravel data retrieval process.

5. If so, we will later find a new folder in the file server directory with a name corresponding to the project name previously specified.

6. To ensure Laravel is successfully installed and ready to use, navigate to the Command Prompt or Terminal to the directory you created earlier. Then enter the following command in the command prompt or terminal:

php artisan serve

If it is called Laravel development server started on the command prompt or terminal, then the next step is to go to the link provided by Laravel. from Originally, we will be forwarded to the address server (This is Later we will be presented with a prospect Home page with Laravel written in the middle.

With the emergence Home page by Laravel, the Laravel application is ready to use.

Hopefully the information provided can be useful to readers. It is hoped that this information can be widely disseminated to inform other readers who may be interested in this information.

Leave a Reply

Your email address will not be published.