AKASH PUNDIR

Framework?

A web framework is a software platform that provides a structured and standardized way to build web applications.

Popular Web Frameworks

Laravel supports MVC

What is MVC ?

Benefits of MVC

Laravel

Laravel is a PHP-based web framework for building high-end web applications using its significant and graceful syntaxes.

Taylor Otwell developed Laravel in July 2011, and it was released more than five years after the release of the Codeigniter framework.

Authentication

Authentication is the most important factor in a web application, and developers need to spend a lot of time writing the authentication code.

Laravel contains an inbuilt authentication system, you only need to configure models, views, and controllers to make the application work.

Innovative Template Engine

  • Laravel’s innovative template engine, called Blade, is designed to simplify the process of creating and managing views (templates) in web applications. Blade provides a clean, expressive syntax that allows developers to write views with ease while providing powerful features for dynamic content rendering.

Effective Object Relational Mapping

When building applications, developers often use object-oriented programming languages like Python, Java, or php to represent entities and their relationships. These entities are typically classes that have attributes and methods. However, databases primarily store data in tables with rows and columns.

ORMs provide a solution to this problem by abstracting the database interactions and mapping the objects to database tables, thereby enabling developers to work with their preferred object-oriented paradigm without worrying about the underlying database structure.

MVC Architecture Support

Laravel’s support for the Model-View- Controller (MVC) architectural pattern brings several benefits to web application development. MVC is a software design pattern that separates the application logic into three interconnected components: Model, View, and Controller.

Secure Migration System

Laravel’s migration system simplifies the process of managing database changes in a structured and consistent manner. It promotes version control of the database schema and helps developers work collaboratively, ensuring the security and integrity of the application’s database.

Unique Unit Testing

Laravel seamlessly integrates with PHPUnit, one of the most widely used and well- established testing frameworks in the PHP ecosystem. PHPUnit offers a rich set of assertion methods and testing features, making it easier to write clear and concise tests.

Laravel Dusk, the built-in browser testing tool, provides an excellent way to perform end-to-end tests and interact with your application as a real user would.

Intact Security

Laravel uses bcrypt hashing to securely store user passwords. Bcrypt is a strong and slow hashing algorithm, making it difficult for attackers to crack passwords using brute force attacks.

Libraries and Modules

Laravel is very popular as some Object-oriented libraries, and pre-installed libraries are added in this framework, these pre-installed libraries are not added in other php frameworks. One of the most popular libraries is an authentication library that contains some useful features such as password reset, monitoring active users, Bcrypt hashing, and CSRF protection. This framework is divided into several modules that follow the php principles allowing the developers to build responsive and modular apps.

Artisan

Laravel framework provides a built-in tool for a command-line known as Artisan that performs the repetitive programming tasks that do not allow the php developers to perform manually. These artisans can also be used to create the skeleton code, database structure, and their migration, so it makes it easy to manage the database of the system. It also generates the MVC files through the command line. Artisan also allows the developers to create their own commands.

Composer

  • For managing the project’s dependencies.
  • Its main purpose is to simplify the process of including external libraries and packages into your Laravel application.

https://getcomposer.org/download/

Installation of Laravel

    • Global Installation
      1. composer global require laravel/installer (One time command)
      2. laravel new first-app (for new app)
    • Per-project Installation composer create-project laravel/laravel first-app ( every time for new app)

Running a Laravel app

cd first-app

php artisan serve

[pdf_note link=”https://drive.google.com/file/d/1shWrs3GiogW-vbq2xhwsZjR7yquSMFxo/view”]