Lompat ke konten Lompat ke sidebar Lompat ke footer

Learn laravel 8 basics for beginners # part1 Installing Laravel 8

 

Assalamualaikum wr.wb, On this occasion, of course, we will learn about the basics of laravel 8 for beginners, where this is a part 1 turorial explanation which provides learning about laravel 8 installations.

Then what are the points that we will discuss on this occasion? you can listen to the points below:

  1. Introduction to the Laravel Framework
  2. Why does it have to be Laravel?
  3. Starting a laravel project with Windows (Docker)
  4. Installation using Composer
Okay, after you read the discussion points that will be discussed. Next, we will enter the first explanation, which is about the Laravel Framework identifier.

1. Learn Laravel 8 basics for beginners (Introduction to the Laravel Framework)

The laravel structure is a site application system that utilizes an expressive and exquisite grammar. The laravel system gives a design and a beginning stage to have the option to assemble the application that you will fabricate. Obviously, this laravel structure permits you to zero in on making something that is the framework you will assemble, while the laravel system will deal with the subtleties. 

The laravel structure is obviously continually attempting to give the best insight by giving extremely refined highlights like intensive reliance infusion, lines and booked assignments just as reconciliation testing. Is it accurate to say that you are new to the laravel system? The laravel structure is a system that can positively assist you with finishing little or enormous scope projects. Which is the place where this laravel system consistently has refreshed highlights contrasted with other PHP structures and is right now the most mainstream structure for the PHP programming language.

2. Learn Laravel 8 basics, Why should you learn Laravel Framework?

In the laravel system, obviously, there are different highlights and structures that can uphold building the site application that you will make. The laravel advancement organization itself accepts that Laravel is the most ideal decision to have the option to construct a cutting edge full-stack site. 

Reformist Framework 
The laravel structure is frequently alluded to as a reformist system, which implies that laravel can create with you, on the off chance that you are simply learning it, obviously there are documentation, aides and instructional exercises that can make it simpler for you to gain proficiency with the intricate details of this laravel system without being excessively troublesome, obviously. 

In the event that you are a senior application designer obviously Laravel gives an incredible asset to doing reliance infusion. The laravel system is obviously custom-made to construct proficient site applications that are prepared to deal with the weight of an organization. 

Adaptable Framework 
The laravel structure is positively entirely versatile. What is intense about the PHP programming language, obviously, has a legitimate and conveyed store framework, for example, redis, and to do level scaling utilizing the laravel structure gets simpler. Indeed applications assembled utilizing laravel systems are not difficult to scale to have the option to deal with a huge number of solicitations each month. 

In the event that you need more unpredictable scaling, obviously, laravel has given a library called Vapor. Where this Vapor can permit you to run Laravel applications at a limitless scale without utilizing a worker like AWS. 

Local area Framework 
The laravel structure joins the best bundles in a PHP programming language environment to offer the most vigorous and easy to use system. Furthermore, gifted application designers from everywhere the world have added to this one structure. It is evident that you are somebody who will contribute later on to build up this Framework.

3. Starting the First Laravel Project

To begin a venture utilizing the laravel structure, obviously we will track down the most straightforward approach to utilize it. There are a few alternatives for creating and running laravel projects on your own PC. Despite the fact that you need to attempt another path sometime later. The laravel system as of now gives SAIL as a default answer for have the option to run projects that you make utilizing Doker. 

Doker is an apparatus to have the option to run applications and administrations in a little and lightweight holder which surely doesn't meddle with different gadgets or an arrangement on every PC. This implies you don't need to stress over designing or setting up complex advancement instruments like site workers and information bases on your PC. To begin, it's very simple, obviously, you just need to introduce Docker on your work area. 

Laravel Sail is a lightweight order line interface that cooperates with Laravel's default Docket arrangement. Sail positively gives an incredible beginning stage to having the option to construct Laravel applications utilizing the PHP programming language, MySQL and Redis information bases without requiring any earlier Docker experience.
Do you get Docker? Try not to stress that everything over Sail can be altered utilizing the docker-compose.yml record that accompanies the laravel structure.

4. Starting the installation on Windows with Docker 

Before we start creating a new Laravel application or project on Windows, make sure you have installed Docker Laptop. If so you also have to make sure that the Windows Subsystem for linux 2 (WSL2) has been installed and is also activated. WSL certainly allows you to run Linux binary executables natively on Windows 10. Information about how to install and activate WSL2 can be found in the Microsoft development section.
After installing and activating WSL2, you should of course make sure that Docker Desktop can be configured to use the WSL2 backend.

Docker WSL2

Assuming this is the case, at that point you are prepared to make your first Laravel project. Kindly run the terminal and start new for your linux WSL2 framework. At that point you can utilize orders in the terminal or CMD to make another laravel project. For instance we will make a Laravel application with the name "learn-laravel8", obviously you can run the order beneath:

curl -s https://laravel.build/belajar-laravel8 | bash 

Obviously you can change the "learn-laravel8" in the URL with any name that coordinates with the undertaking you are going to make. The laravel system application index will be made in the catalog where you run the order. 

After the laravel project has been effectively made, you can explore into the application index and start Laravel Sail. Laravel Sail gives a straightforward order line interface to associate with utilizing Laravel's default Docker design: 

cd belajar-laravel8 
./vendor/bin/sail up

 The first occasion when you run Sail up, obviously the Sail library or compartment will be incorporated into your machine. This obviously can require a few minutes. Be that as it may, you don't have to stress for the subsequent attempt, etc will be quicker. 

WSL2 improvement 

Obviously, you need to change the Laravel application documents that were made utilizing the WSL2 establishment. To have the option to meet these prerequisites, the Admin suggests utilizing the VSCode Text Editor on the grounds that there are numerous options that can be utilized to aid its turn of events. 

After the apparatus is introduced effectively, you can open the laravel project that you made by running the code. To order the application root index that you make utilizing the Windows terminal.

5. Installing Laravel Using Composer

On the off chance that you have introduced PHP or XAMPP and Composer, you can make another venture utilizing author straightforwardly. After the application has been effectively made, you can obviously begin the laravel Framework neighborhood improvement worker by utilizing the php craftsman worker order, if it's not too much trouble, focus on the order beneath:
composer create-project laravel/laravel belajar-laravel8 cd belajar-laravel8 php artisan serve

Installing Laravel For other ways, of course you can use the installation with the Global command, for application, please follow the CLI command below:

composer global require laravel/installer laravel new belajar-laravel8 cd belajar-laravel8 php artisan serve

Next, you have to make sure you put the entire Composer system vendor bin directory in $ PATH so that the laravel framework is easy to run, for its own storage, of course, it differs from each Operating system for windows itself as follows:

Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin 

To be more agreeable, obviously, the laravel establishment can likewise make a Git vault for the task you are making. To show that you will make a Git store, add the – git banner when you make another undertaking. Models resemble the accompanying

laravel new belajar-laravel8 --git 

This order will obviously instate another repositoryGit for the task you are making and will quickly stack the fundamental laravel structure. The git order accepts that you have introduced and arranged Git the correct way. You can obviously additionally utilize the – branch order to set up another branch on git. Instances of use are as per the following:

laravel new belajar-laravel8 --git --branch="main" 

Aside from utilizing the – git banner, you can likewise utilize the – github banner to make a git storehouse and furthermore to make an individual vault that is viable with github. The order is as per the following:

laravel new belajar-laravel8 --github 

You can of course also use the –organization flag to create a default repository for the github organization with the following command:

laravel new belajar-laravel8 --github="--public" --organization="laravel" 

Possibly that is the thing that the administrator can say about how to introduce the laravel system, either utilizing Docker or Via Composer. You are allowed to pick the technique that you believe is the most effortless to utilize. Much obliged to you for visiting and perusing this article about Learning fundamental laravel 8 for amateurs # part1 Installing Laravel 8, I trust this article can be valuable for perusers.

Read More : Restful API Laravel 

By: Muhammad Rizal Supriadi