How to Install Laravel and Create Project

How to Install Laravel

  • Download the Laravel installer using Composer :
composer global require laravel/installer
  • Then use laravel new command will create a fresh Laravel installation in the directory you specify
laravel new projectname
  • Install Laravel by issuing the Composer create-project command
composer create-project --prefer-dist laravel/laravel projectname
Tagged : /

What is Laravel?

Laravel is a free, open-source PHP based Web Framework for building High End Web Applications, following the Model View Controller architectural pattern and based on Symfony.
It is created by Taylor Otwell.
Laravel Source Code : https://github.com/laravel/framework

Advantages of Laravel

  • Open Source
  • Collection of tools
  • Save Time
  • Improve Productivity
  • Robust and Easy
  • Security of the Application
  • Authentication
  • Routing
  • Templating
Tagged : /

Complete Referance of MVC Design Pattern

Model View Controller (MVC)

The MVC is an architectural pattern that separates an application into three main logical components Model, View, and Controller.
Each of these component has their own role in a Project.
MVC model was first introduced in 1987 in the Smalltalk programming language.
More than 80% of all web app frameworks rely on the Model View Controller architecture.

Model

The model is responsible for getting data from a database, packaging it in data objects that can be understood by other components, and delivering those objects, most of which will happen in response to input from the controller.

View

It represents how data should be presented to the application user. User can read or write the data from view.
Basically it is responsible for showing end user content, we can say it is user interface.
It may consists of HTML, CSS, JS.

Controller

The user can send request by interacting with view, the controller handles these requests and sends to Model then get appropriate response from the Model, sends response to View.
It may also have required logics.
It works as a mediator between View and Model.

Why use MVC?

  • Organized Code
  • Independent Block
  • Reduces the complexity of web applications
  • Easy to Maintain
  • Easy to modify

Basic Structure

  • Assets
    • CSS
    • Images
    • JS
  • Config
    • Database Config File
  • Controllers
  • Model
  • Views
Tagged : /

What is a Web Framework, Why do we use Web Frameworks?

What is a Web Framework?

A Web Framework (WF) or Web Application Framework (WAF) which helps to build Web Applications.
Web frameworks provide tools and libraries to simplify common web development operations. This can include web services, APIs, and other resources.
Web frameworks help with a variety of tasks, from templating and database access to session management and code reuse.
More than 80% of all web app frameworks rely on the Model View Controller architecture.

Why do we use Web Frameworks?

  • Collection of tools
  • No need to start from scratch
  • Save Time
  • Improve Productivity
  • Clean Code
  • Reusable Code
  • Testing
  • Debugging

Some Web Framework

  • Laravel
  • Codeigniter
  • Zend
  • Django
  • Spring
Tagged : / / /