Tips on how to Set Up Laravel 8 on Your Android Telephone

By Valuable Oladele
Hey, how are you doing? On this article, I will present you how one can set up Laravel 8 in your cellphone.
To get probably the most out of this information, you need to have some information of PHP and you need to know what Laravel is. However for those who do not, don’t fret – I’ll clarify the fundamentals so you may get began.
What Is Laravel?
Laravel is an online software framework with expressive, elegant syntax. It is constructed on PHP, which implies that Laravel is PHP but it surely makes issues simpler to work with.
It comes with numerous packages for varied options, like authentication, so we need not write authentication ourselves. To study extra about what Laravel can do, you’ll be able to go to the positioning at laravel.com.
Why I wrote this tutorial
I created this tutorial as a result of I need folks excited by programming who haven’t got a laptop computer or laptop to have the ability to construct issues on their telephones.
My last post on freeCodeCamp made me understand that individuals are excited by studying how the tech works, in order that’s why I am making extra guides like this.
So let’s dive into it. On this tutorial I’m going to indicate you how one can set up composer.php and use it to arrange Laravel 8 in your cellphone .
I’m Valuable Oladele, and I am nearly 19 this month . I am from Nigeria and I will probably be taking you thru this course of. And for those who’re questioning how I do know a lot about this, it is as a result of I additionally haven’t got a laptop computer so I discover with my cellphone as a substitute
.
Necessities
To undergo this tutorial, you will want an Android cellphone with V6.0+.
Arrange
We have to head over to the Play Retailer and obtain Termux:
Termux is a Linux-based system which we are able to use on our telephones. It is so simple as utilizing your common Linux – you’ll be able to set up something, even Kali, Ubuntu, or no matter you need. However for this tutorial we will probably be utilizing it to arrange Laravel 8 on our cell phone.
Obtain composer
Earlier than we obtain composer, we have to open up our Termux app and kind on this command:
termux-setup-storage
It will ask you for storage permissions, so go forward and click on settle for. When you’re accomplished head over to https://getcomposer.org/download/.
We have to seize every little thing there. However earlier than that we have to set up PHP so we are able to use it in our app. To do this in your Termux, kind within the following command:
apt set up php
and click on enter. You need to see this:
As soon as that’s accomplished head over to the composer web page and seize the code. We have to do that as a result of Termux is Linux-based. If it was Home windows there could be a easy button to obtain composer.exe there.
Copy the entire code and head over to Termux the place you’ll be able to paste it in. Then click on enter.
When composer is put in you need to see one thing like this:
Tips on how to Set up Laravel 8
Earlier than we set up Laravel 8, let’s verify to see if we have now a composer.phar file. In your Termux kind this command:
ls
and hit enter. You will notice the out there information there.
You may see the composer.phar file and a storage folder. The storage folder grants entry to your file supervisor. Bear in mind the termux-setup-storage command you wrote first.
Now let’s set up Laravel 8. To take action we are able to both create a challenge or simply set up it globally. However it’s kind of of an extended course of when putting in it globally in your cellphone as a result of you want to set a path and so forth, and it may be fairly complicated. So on this information we’ll create a challenge as a substitute.
In your Termux go forward and kind this:
php composer.phar create-project laravel/laravel myapp
myapp
is simply the challenge identify – you’ll be able to change it to no matter you need. Then hit enter and anticipate the magic to occur.
Whenever you see the beneath, it implies that Laravel has been put in:
Simple as pie. Now to check it, you’ll be able to cd into myapp
by typing cd myapp
. Then you’ll be able to run the Laravel server with php artisan serve
.
Voilà – growth has began
Now you’ll be able to open http://127.0.0.1:8000 in your browser and see that Laravel is operating:
Additionally be sure you do that so your Termux app will not pressure shut when you’re coding:
That is it!
Thanks for studying. I hope you discovered one thing from this tutorial. You need to now be capable of set up Laravel in your Android cellphone and begin utilizing it to construct apps.
If you need extra content material from me, you’ll be able to subscribe to my YouTube channel
DevStack