Download presentation
Presentation is loading. Please wait.
Published byKaren Goodman Modified over 9 years ago
1
THE PHP FRAMEWORK FOR WEB ARTISANS
2
What is Laravel? Developed by Taylor Otwell Web application framework Follows MVC design pattern Expressive syntax
3
Why use Laravel Elegant syntax Utilizes the latest PHP features Well documented CLI Tools Eloquent ORM Fun to develop with
4
Closures Introduced in PHP 5.3 Anonymous functions Route::get(‘login’, function() { return View::make(‘users/login’); });
5
The Syntactic Sugar Easy to understand Expressiveness and elegance Auth::check() Input::get() User::all()
6
The MVC Layers Eloquent ORM Blade Engine Controller
7
Eloquent ORM Easy to use class Feed extends Eloquent { public function user() { return $this->belongsTo('User'); } public function moment() { return $this->created_at->diffForHumans(); }
8
Eloquent ORM Example queries: Book::all() Book::find(1) Book::where(‘name’, ‘=‘, ‘John Doe’) Insert / Update $b = new Book(); $b->title = ‘Intro to Laravel’; $b->description = ‘This book rocks’; $b->save; $b = Book::find(2); $b->title = ‘Advanced Laravel’; $b->save();
9
Eloquent ORM Relationship mapping public function user() { return $this->belongsTo(‘Author’, ‘authro_id’); {
10
Blade Engine Stock templating engine for laravel Supports template inheritance and sections @yield('page_title') Some text @yield('content')
11
Blade Engine @extends(‘layout’) @section(‘page title’, ‘Test Page’) @section(‘content’) Hello user! @stop
12
Bootstrap The most popular front-end framework for developing responsive, mobile first projects on the web.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.