PHPGurukul

What is Laravel?

  • Laravel is an open-source PHP framework.
  • Laravel is the most popular PHP Framework.
  • Uses a MVC design pattern.
  • Intended for the development of web applications keeping things clean and organized.
  • Relational database access.
  • Laravel has a “syntactic sugar” orientation.

MVC (Model View Controller)

Model: The central component of the pattern. It is the application’s dynamic data structure, independent of the user interface. It directly manages the data, logic, and rules of the application.

View: Any Representation of information such as a chart, diagram or table. In other words, the user interface.

Controller: Accepts input and converts it to commands for the model or view.

Composer

Composer is PHP package manager.

It is used to install Laravel as well as packages used inside a laravel app.

$composer global require laravel/installer
$laravel new webapp

Artisan

  • Artisan is Laravel’s command line interface.
  • Create Controller, Model, View, Migration and more.
  • Run migrations
  • Run scheduled tasks

Eloquent ORM (Object Relational Mapper)

The way you interact with the database without writing complex SQL queries.

For Ex: Let’s say you have post table and you want to retrieve all post

$posts= Post::gets();

If you want to apply the filter, need only active posts:

$activePosts=Post::where('active',true);

Blade syntax and templating

  • Write once, use forever.
  • Do not rewrite code every time you need a new page.
  • Complied into plain PHP and cached.
  • Views can extend layouts.

Anuj Kumar

This is Anuj Kumar. I’m a professional web developer with 4+ year experience. I write blogs in my free time. I love to learn new technologies and share with others.
I founded PHPGurukul in September 2015. The main aim of this website to provide PHP, Jquery, MySQL, PHP Oops and other web development tutorials.
.

Recommended Tutorials for you


Add comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Web Hosting with a FREE domain. On sale ₹99.00/mo

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most popular


Most discussed