How to install Laravel framework for new project

in #utopian-io8 years ago (edited)

How to install Laravel framework for new project

Hello everyone, on this occasion I will share a little tutorial on how to install the Laravel framework for the new project. Here I will explain there are several ways to install the Laravel framework for a new project. By using four ways, please follow one by one the way I share this. Okay we'll start the first way first. Please follow the steps below.

1.Using create-project composer

2.Using Laravel Installer

3.Download the Latest Laravel Release Source

4.Download Source from Github Release Laravel

In all four ways, it still requires Composer and internet to install the Laravel framework to start a new project.

You need to remember Remember to be able to run the steps of install framework Laravel, composer already must be installed on PC friends, if not yet have composer, please install first. Please visit Composer to install it.

Note before we start

  1. Make sure all the terminal commands we do are in our localhost web directory (eg: C:\xampp\htdocs,or/var/www/html).

  2. In this tutorial I use Ubuntu.

01 Using a create-project composer

To install the Laravel Framework using a create-project composer, please perform the following steps

1.Give the following command to the terminal

$ composer create-projekt Laravel/Laravel name-direktori-projek

2.Please Wait until the installation process is complete. The duration of this process depends on the speed of the internet connection we use.

3.After this process is complete, then we go to directory, name-project-directory
$ cd name-direktori-project

4.For us to check if Laravel is installed correctly, try the following command: $ php artisan - v

5.Next will appear information like this: Laravel Framework 5.4.15

02. Using Laravel Installer

Laravel installer is an application created by laravel author so we can install laravel with
$ Laravel new name_direktori

For us to use this way, we will install a package from a composer named Laravel/installer on our PC or laptop. The steps are as follows

1.By using a terminal, give the command as follows:
$ composer global require "laravel/installer"

With this command, the composer will download the Laravel / installer package globally in our PC, because this package we will use with terminal

2.Once that is done, we add a PATH export script to the file ~ /. bashrc. Add the following script at the end of the contents of file the export PATH="$PATH:$HOME/. compeser/vendor/bin"

3.Next please Save and exit

4.At the terminal, give the following command: $ source ~/. bashrc

5.If this stage is executed correctly, it should be when we give the following command to the terminal: $ laravel - V Will generate version information Laravel Installer: Laravel Installer version 1.3.3

Well, with the Laravel Installer, to install a new Laravel project.

1.We can give the command: $ laravel new name-direktori-project

2.When the installation process is complete, then we can cd into the project-name command: $ php artisan - V

3.If the installation process goes well, then the command will generate:
Laravel Framework 5.4.15

This means how to install the second Laravel is finished. By using Laravel Installer.

03. Download the Latest Laravel Release Source

The way to install the third Laravel is to download the latest Laravel framework release source code.

1.Download the Laravel source framework from the following url: http://cabinet.Laravel.com/latest.zip. We will get the file latest.zip

2.Next Move the file into our project directory, then extract it to directory-project-directory name.

3.In terminal, cd to project-project-name, then give command to terminal:
$ composer install

Wait until the installation process is complete. In this step, the installation process by the composer tends to be faster, because in the project directory we already have composer.lock file. So that the composer live install all the packages on the file.

4.If the installation process by the composer is complete, then we can directly try the command php artisan - V And generate Laravel Framework 5.4.15

Well, even though we initially "took the source" of this framework by downloading it, we still have to use the composer also to install the dependency packages.

04. Download Source from Github Laravel

For this step how to install this, following the installation phase, please see well:

1.First please Visit the github page of Laravel https://github.com/Laravel/Laravel

2.Next please click the link releases or https://github.com/Laravel/Laravel/releases

3.Click the icon/link zip on the latest version of Laravel release to download source code with ZIP format

4.Extract the zip file in our project web directory, eg to directory project-directory name.

5.Next please open terminal, then
cd name-direktori-project

6.Then give the command on the terminal composer install. Wait until the installation process is complete

7.After the installation process by the composer is finished, then we try the command php artisan - V

8.Next will appear information like
Laravel Framework 5.4.15

Actually to install laravel on the new project, we can duplicate the directory of the old project, as long as the dependency package used is appropriate (same as the previous project), then this could be one solution.

This is an explanation of how to install the Laravel framework for a new project. For this stage everything is finished and hopefully this can be useful for all. If anyone wants to be asked, please comment



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

  • Design or video editing related tutorials, gameplay, simple on-screen instructions, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted.

You can contact us on Discord.
[utopian-moderator]

Hey @yokunjon, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.099
BTC 63275.91
ETH 1838.64
USDT 1.00
SBD 0.38