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:
- Introduction to the Laravel Framework
- Why does it have to be Laravel?
- Starting a laravel project with Windows (Docker)
- Installation using Composer
1. Learn Laravel 8 basics for beginners (Introduction to the Laravel Framework)
2. Learn Laravel 8 basics, Why should you learn Laravel Framework?
3. Starting the First Laravel Project
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
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
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