Laravel for Beginners  : a Quick Guide - 1
Tags: php, mvc, laravel8
Published: 2021-08-08 16:03:03

**[Laravel](https://laravel.com/)**
PHP’s MVC framework, say a popular one too

It is developed by [Taylor Otwell](https://twitter.com/taylorotwell), thank him for making our web development somewhat easier, its current version is 8.x

###What you need before dive into it?###

Cool :) 
> basics of HTML, CSS, JS and PHP is enough (I hope you know these at least or learn them first)

I am sure developing web application using Laravel is easy (hope so) and interesting too :)

> ##Laravel is a PHP Framework##

###What is Framework?###
Simply, a set of pre-developed files that makes our development easier and faster, we develop->code our ideas on top of these files...

 
###Why we need Framework?###
Reduces development time, avoid developing simple components too, then finally we can get relief from scratching our head for managing data flow between multiple files ( but of course frequently we need to scratch our head for logical reasons :| )

If you feel **you are creative** - **you have patience** - **eager to explore** then for a sure Laravel thrills you...

Lets Begin,

> **Laravel follows a MVC architecture** ...

**What is MVC?**
* MVC is an architecture where Database Operations - Business Logic - View (visual representation) were kept separately.
* It makes code readability easier 
* also makes our work easier too :)

> **MVC - Model - View - Controller**

* Model - Place to write all database related code
* View - Where we write UI related code
* Controller - Holds an actual logical part, acts as a mediator between Model and View

> **System Requirements**

* Apache Server - install either [WAMP](https://www.wampserver.com/en/) (easier) /[XAMPP](https://www.apachefriends.org/download.html)
* [Composer](https://getcomposer.org/)
* Browser
* IDE - I prefer [VSCode](https://code.visualstudio.com/download) 


.
.
.
.
.
.
.
.
.
.
.
.
.

I hope you were done with installation :)

then to run server
> ###If you are using WAMP##

just double click on ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mpahp656xbbckgj6kt5o.png)

you can observe the transition status of WAMP server
Starting/Error - ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6cnbvxm19cxhlyk9hkv.png)
Partially Completed - ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2e4kiosowavo8ckmanrn.png)
Started Successfully - ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhqrx0l4twdftchj3chg.png)

> ###If you are using XAMPP###

just double click on ![Alt Text](https://img.utdstc.com/icon/52b/ca7/52bca7c3ba7b1ee97913ca068d5e1d08d64806ecd6a979d4f96eef63d1254c92:200)

then within its interface **start** Apache and MySQL
![Alt Text](https://static.filehorse.com/screenshots/developer-tools/xampp-screenshot-01.png)

> ###then open browser hit  **http://localhost**   ###

if a page related 
to WAMP/XAMPP loads properly then it is clear that server started properly else there might be some problems with your system

> ###open **cmd** - a command prompt and enter **composer** ###

if it shows like this 
![Composer Message](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9np1b4pbisdz1t28zmes.png)
it justifies that composer got installed successfully

Got Tired after these steps :(
Don't worry you are just one step away from **Laravel** installation...

come lets do that one too :)

* Open command prompt at you desired location in your system
* Now you are installing LARAVEL through using composer
* enter a command 


`composer create-project laravel/laravel my-app`


wait for a while to install all necessary dependencies
* then, Bingo

> LARAVEL got installed, then you can see these messages

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q5lfh9devp8iwatxchrb.png)


> **Then How to run this Application ?**

That too still simple,

open command prompt inside a created laravel project

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ht3yiun9eprkze21eibl.png)

then enter 
`php artisan serve`
You will get an URL, where our Laravel app is running
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0t9e6wcmxrl2dxm94y5f.png)

Ok... the last step :) 
last one...

open the browser then hit the URL provided in a cmd propmt...

Hurray !!!!!

Our Laravel Application is running

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nja3i35yk3qli1w6oooa.png)

Enough for now right!!!... Ok

I hope you gained some hint on **What is Laravel?** and **How to install it?**


Lets meet in the next topic on Laravel Application Structure and how MVC induced in it...

Bye :)