SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
By: Sita Prajapati
28Th
August, 2015
Free, Open Source PHP framework
Developers Taylor Otwell
Initial release June 2011
Stable release 5.1
Development status Active
Written in PHP5
Operating system Cross-platform
Type Web application framework
License MIT License
Website laravel.com
Introduction
Laravel
Introduction
Laravel
Other Frameworks Laravel
M ---------> Eloquent ORM
V ---------> Blade Engine
C ---------> Resourceful Controller
MVC
Command line interface
● Provides a number of commands php artisan list
Common uses
● Managing database migrations
and seeding
● Publishing package assets
● Generating boilerplate code for
controllers and migrations
Artisan
Resourceful Controllers
● Handles the HTTP requests (GET, POST, PUT, PATCH, DELETE).
● Predefine controller methods to handle the HTTP verbs (index, show,
create, store, edit, update, and destroy).
Controllers
Route with Resource Controller
● Route::resource(‘user’, ‘UserController’);
Routes
Eloquent ORM
Some examples of queries:
Book::all();
Book::find(1);
$b = new Book();
$b->title = 'Laravel Basics';
$b->description = 'Besr';
$b->save();
Scope
public function scopePopular($query) {
return $query->where('rating', '>', '4');
}
Book::popular()->get();
Accessor
public function getGenderAttribute($value){
return ($value == 'm') ? 'Male' : 'Female';
}
Mutator
public function setNameAttribute($value) {
$this->attributes['name'] = strtolower($value);
}
Built-in ORM
● Active Record style
● Easy to use
● Relationship mapping
● Supports soft delete
● Support query scope
● Supports accessors and mutators
Blade Engine
Examples:
@if (.....) @for(....)
... ...
@elseif @endfor
...
@else
…
@foreach (....)
. ...
@endforeach
My name is <?php echo $user->name ?>
My name is {{ $user->name }}
Blade templating
● Provide own control structures.
- Conditional statements
- Loops
● Alternative way to echo variable values.
● Fast in rendering page.
Migrations/Seeders
Migrations
● Provide version control systems for database schemas.
Seeders
● Populate database tables with selected default data.
● Can be used for testing or for initial application setup.
Inversion of Control
IoC container
● Describe your objects to the container, and every time you resolve a class
the dependencies are injected automatically.
● Core laravel is an IoC container.
● Holds instances of Request, Session, FormRequest etc.
Never Stop Learning
Where do I learn more?
laravel.com: docs, api, forums
http://laravel.io/: podcasts, news
Twitter, @laravelphp, @laracasts, @Laracasts_Forum, @laravelnews
IRC, http://laravel.io/irc
Paid
https://leanpub.com/laravel: Author's book
https://laracasts.com/: Has many free videos as well
https://leanpub.com/laravel-testing-decoded
Thank You
YOU
LEARN SOMETHING
EVERY DAY
IF YOU PAY
ATTENTION
Questions
Who is the creator of laravel?
Taylor Otwell

Mais conteúdo relacionado

Mais procurados

Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 

Mais procurados (20)

Laravel overview
Laravel overviewLaravel overview
Laravel overview
 
Laravel 5
Laravel 5Laravel 5
Laravel 5
 
Getting started with laravel
Getting started with laravelGetting started with laravel
Getting started with laravel
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
Laravel Tutorial PPT
Laravel Tutorial PPTLaravel Tutorial PPT
Laravel Tutorial PPT
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consLaravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & cons
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP framework
 
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
 
PHP Laravel Framework'üne Dalış
PHP Laravel Framework'üne DalışPHP Laravel Framework'üne Dalış
PHP Laravel Framework'üne Dalış
 
Hire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersHire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel Programmers
 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New Features
 
Laravel presentation
Laravel presentationLaravel presentation
Laravel presentation
 
What Is Hobo ?
What Is Hobo ?What Is Hobo ?
What Is Hobo ?
 
Projects In Laravel : Learn Laravel Building 10 Projects
Projects In Laravel : Learn Laravel Building 10 ProjectsProjects In Laravel : Learn Laravel Building 10 Projects
Projects In Laravel : Learn Laravel Building 10 Projects
 
All Aboard for Laravel 5.1
All Aboard for Laravel 5.1All Aboard for Laravel 5.1
All Aboard for Laravel 5.1
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
Getting to know Laravel 5
Getting to know Laravel 5Getting to know Laravel 5
Getting to know Laravel 5
 
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
 
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
 

Semelhante a Laravel

Laravel Restful API and AngularJS
Laravel Restful API and AngularJSLaravel Restful API and AngularJS
Laravel Restful API and AngularJS
Blake Newman
 
Powershell Training
Powershell TrainingPowershell Training
Powershell Training
Fahad Noaman
 

Semelhante a Laravel (20)

Laravel Level 1 (The Basic)
Laravel Level 1 (The Basic)Laravel Level 1 (The Basic)
Laravel Level 1 (The Basic)
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course Deck
 
Hsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfHsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdf
 
What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extended
 
Memphis php 01 22-13 - laravel basics
Memphis php 01 22-13 - laravel basicsMemphis php 01 22-13 - laravel basics
Memphis php 01 22-13 - laravel basics
 
Laravel Restful API and AngularJS
Laravel Restful API and AngularJSLaravel Restful API and AngularJS
Laravel Restful API and AngularJS
 
Laravel 4 presentation
Laravel 4 presentationLaravel 4 presentation
Laravel 4 presentation
 
Php manish
Php manishPhp manish
Php manish
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Powershell Training
Powershell TrainingPowershell Training
Powershell Training
 
Laravel
LaravelLaravel
Laravel
 
My Journey with Laravel by Shavkat, Ecompile.io
My Journey with Laravel by Shavkat, Ecompile.ioMy Journey with Laravel by Shavkat, Ecompile.io
My Journey with Laravel by Shavkat, Ecompile.io
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
Laravel Meetup
Laravel MeetupLaravel Meetup
Laravel Meetup
 
Dynamic Proxy by Java
Dynamic Proxy by JavaDynamic Proxy by Java
Dynamic Proxy by Java
 
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehookPHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
Laravel & Composer presentation - WebHostFace
Laravel & Composer presentation - WebHostFace Laravel & Composer presentation - WebHostFace
Laravel & Composer presentation - WebHostFace
 

Último

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Último (20)

Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 

Laravel

  • 2. Free, Open Source PHP framework Developers Taylor Otwell Initial release June 2011 Stable release 5.1 Development status Active Written in PHP5 Operating system Cross-platform Type Web application framework License MIT License Website laravel.com Introduction
  • 4. Other Frameworks Laravel M ---------> Eloquent ORM V ---------> Blade Engine C ---------> Resourceful Controller MVC
  • 5. Command line interface ● Provides a number of commands php artisan list Common uses ● Managing database migrations and seeding ● Publishing package assets ● Generating boilerplate code for controllers and migrations Artisan
  • 6. Resourceful Controllers ● Handles the HTTP requests (GET, POST, PUT, PATCH, DELETE). ● Predefine controller methods to handle the HTTP verbs (index, show, create, store, edit, update, and destroy). Controllers
  • 7. Route with Resource Controller ● Route::resource(‘user’, ‘UserController’); Routes
  • 8. Eloquent ORM Some examples of queries: Book::all(); Book::find(1); $b = new Book(); $b->title = 'Laravel Basics'; $b->description = 'Besr'; $b->save(); Scope public function scopePopular($query) { return $query->where('rating', '>', '4'); } Book::popular()->get(); Accessor public function getGenderAttribute($value){ return ($value == 'm') ? 'Male' : 'Female'; } Mutator public function setNameAttribute($value) { $this->attributes['name'] = strtolower($value); } Built-in ORM ● Active Record style ● Easy to use ● Relationship mapping ● Supports soft delete ● Support query scope ● Supports accessors and mutators
  • 9. Blade Engine Examples: @if (.....) @for(....) ... ... @elseif @endfor ... @else … @foreach (....) . ... @endforeach My name is <?php echo $user->name ?> My name is {{ $user->name }} Blade templating ● Provide own control structures. - Conditional statements - Loops ● Alternative way to echo variable values. ● Fast in rendering page.
  • 10. Migrations/Seeders Migrations ● Provide version control systems for database schemas. Seeders ● Populate database tables with selected default data. ● Can be used for testing or for initial application setup.
  • 11. Inversion of Control IoC container ● Describe your objects to the container, and every time you resolve a class the dependencies are injected automatically. ● Core laravel is an IoC container. ● Holds instances of Request, Session, FormRequest etc.
  • 12. Never Stop Learning Where do I learn more? laravel.com: docs, api, forums http://laravel.io/: podcasts, news Twitter, @laravelphp, @laracasts, @Laracasts_Forum, @laravelnews IRC, http://laravel.io/irc Paid https://leanpub.com/laravel: Author's book https://laracasts.com/: Has many free videos as well https://leanpub.com/laravel-testing-decoded
  • 14. YOU LEARN SOMETHING EVERY DAY IF YOU PAY ATTENTION
  • 15. Questions Who is the creator of laravel? Taylor Otwell