Laravel is becoming as one of the most popular PHP frameworks in the modern web development field. It has so many features that makes our work easier than pure coding of PHP. It's mainly built upon MVC architecture as same as Codeigniter.
Now I'm going to show you how to configure Laravel in your machine.
Step 1
Install XAMPP or WAMP. I have installed XAMPP. Click here to download XAMPP. Download the 4th one.
After the installation, open XAMPP control panel by searching XAMPP word. Start the first 2 services Apache and MYSQL.
Then open a web browser and type this code in the URL. You will get a web page with the details of your PHP version.
http://localhost/dashboard/phpinfo.php
Step 2
Download Composer from here. Click on Composer-Setup.exe to download it.
Then run the setup. When you click on next, installation path will be taken by the setup automatically. Don't change it. Then click next. Proxy server settings is not needed to configure and keep them as it appears.
After finishing installation, open cmd and type composer on it. If you get an output like this, it has been installed well.
Step 3
Navigate to C:\xampp\htdocs and make a new folder called Laravel(or any name). Open cmd or power shell and type C:\xampp\htdocs\Laravel to go into the folder created. Now we have to create our First Project. Type this command on cmd to create a new project. Make sure that you have an active internet connection!
composer create-project --prefer-dist laravel/laravel FirstProject
Now the project ts being created with dependencies. Wait until it stops downloading...
Step 4
Go into the project folder from cmd.
Command:
cd FirstProject
But make sure Apache and MYSQL services are still running. Otherwise this will not work.
Type this command to sun the project.
Command:
php artisan serve
You will see that cmd says like this...
Laravel development server started:
If you got it, you have done correctly! The last thing you need to do is open your web browser and type the http...code line displaying in cmd. In my case;
http://127.0.0.1:8000
or http://localhost:8000
Now you can see the default project given by Laravel to us...
I think now you have the basic idea to start a Laravel project! I will come back from another article soon!
Goog Bye Guys!
Getting started with Laravel
Reviewed by DAL
on
February 17, 2018
Rating:
No comments: