What is Laravel?
Laravel is a PHP-based web framework for building high-end web applications using its significant and graceful syntaxes.
It comes with a strong collection of tools and provides application architecture.
It includes various characteristics of technologies like ASP.NET MVC, CodeIgniter, Ruby on Rails, and a lot more.
This framework is an open-source framework.
It facilitates developers by saving a huge time and helps reduce the thinking and planning to develop the entire website from scratch.
Laravel was developed by Taylor Otwell in July 2011 and it was released more than five years after the release of the Codeigniter.
Laravel is a PHP-based web framework like Codeigniter.
Laravel is one of the open-source PHP frameworks.
Laravel follows the model-view-controller (MVC) architectural pattern.
Laravel is one of the most popular PHP frameworks after Codeigniter.
Features of Laravel:
Authentication and authorization of users
ORM (Object Relational Mapper) features
Provides template engine
What does laravel do?
Models & DB migrations
Views / Templates
Storage & File Management
Email & Config
What is a composer?
Laravel implements a composer for managing dependencies
URL to download composer
How to set up Laravel?
download the installer of Laravel with the help of Composer
composer global requires "Laravel/installer"
Laravel includes the Artisan CLI Commands:
Creating controllers & models
Creating database migration files and running migrations
Create providers events jobs form requests, etc.
Create custom commands
Examples of Artisan Commands:
$ php artisan list
$ php artisan help migrate
$ php artisan make: controller CrudController
$ php artisan make: model Crud-m
$ php artisan make: migration add_crud_to_db-table=crud
$ php artisan migrate
$ php artisan tinker
Laravel includes the eloquent object-relational mapper
=> Makes querying & working with the DB very easy
=> We can still use row SQL queries if needed
$crud = new crud;
$crud->title = “New Crud”;
Blade Template Engine:
Simple and powerful
Control structure (if-else, loops, etc)
Can you use
Template Inheritance: Extends layouts easily.
Can create custom components
This is the Maser sidebar
@section(‘title’, ‘page title’)
this is appended to the master sidebar
this is my body content
How to Install the laravel app
->>> composer create-project laravel/laravel crud app
how to make a controller in Laravel
->>> migrate database
Run laravel app
->>> php artisan serve
Mirate Table into Database
->>> php artisan migrate
Command to find the Laravel version
->>> php artisan --version
The root directory structure of Laravel