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.
About Laravel:
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:
Routing controllers
Configuration management
Testability
Authentication and authorization of users
Modularity
ORM (Object Relational Mapper) features
Provides template engine
Building schemas
E-mailing facilities
What does laravel do?
Route Handling
Security Layer
Models & DB migrations
Views / Templates
Authentication
Sessions
Compile assets
Storage & File Management
Error Handling
Unit Testing
Email & Config
Cache Handling
What is a composer?
Laravel implements a composer for managing dependencies
URL to download composer
https://getcomposer.org/download/
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.
Show routes
Session commands
Run tinker
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
Eloquent ORM
Laravel includes the eloquent object-relational mapper
=> Makes querying & working with the DB very easy
=> We can still use row SQL queries if needed
Use App/Crud
$crud = new crud;
$crud->title = “New Crud”;
$crud->save();
Blade Template Engine:
Simple and powerful
Control structure (if-else, loops, etc)
Can you use
Template Inheritance: Extends layouts easily.
Can create custom components
@section(‘sidebar’)
This is the Maser sidebar
$show
@yield(‘content’)
@extends(‘layouts.app’)
@section(‘title’, ‘page title’)
@section(‘sidebar’)
@parent
this is appended to the master sidebar
@endsection
@section(‘content’)
this is my body content
@endsection
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
0 Replies to “What Is Laravel? How To Install Laravel? PHP Based Laravel Framework”
Leave a Reply
Your email address will not be published.