Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Introduction to Laravel 4

Presentation made at Laravel Brussels on 29 October 2013: www.meetup.com/Laravel-Brussels. Feel free to edit and reuse. Code examples freely borrowed and adapted from the Laravel documentation. Images: laravel.com / laracon.eu / laravel.io
by

Ben Rey

on 3 November 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Introduction to Laravel 4

@bjmrey
Laravel Brussels, 29 October 2013
What is Laravel?
PHP 5.3+

MVC

Expressive, elegant syntax

Makes application development easy and enjoyable

Lightweight, yet powerful
A web application framework...
... created by one man
Laravel 1 - June 2011
Laravel 2 - November 2011
Laravel 3 - February 2012
Laravel 4 - May 2013
Laravel 4.3 - November 2013
What does it do?
Routing
Controllers
Models
RESTful Routing

Data: Eloquent ORM, query builder, migrations, ...

Blade template engine
Composer
Basic GET route
Route parameters
laravel
A Framework for Web Artisans
Authentication
Cache
Session
Queues
Events
Facades
Localization
Mail
Pagination
Unit Testing
Helpers
Forms & HTML
+
getcomposer.org
packagist.org
your project / composer.json
require": {
"symfony/browser-kit": "2.3.*",
"symfony/console": "2.3.*",
"symfony/css-selector": "2.3.*",
"symfony/debug": "2.3.*",
"symfony/dom-crawler": "2.3.*",
"symfony/event-dispatcher": "2.3.*",
"symfony/finder": "2.3.*",
"symfony/http-foundation": "2.3.*",
"symfony/http-kernel": "2.3.*",
"symfony/process": "2.3.*",
"symfony/routing": "2.3.*",
"symfony/translation": "2.3.*"
}
Installing Laravel is super easy with Composer
composer create-project laravel/laravel folder_name
...
How is it made?
Artisan
Laravel's command line interface
Taylor Otwell
Continues to lead development
...with a growing community
Lots of helpful commands:
run database migrations
seed the database
optimise the framework
serve the app on PHP server
flush the cache
generate code for you, e.g. a controller
+
Create your own commands!
How does it look?
www.mysite.com
www.mysite.com/user/235
Route constraints
www.mysite.com/user/benny
www.mysite.com/user/235
Route names
www.mysite.com/user/profile
Route to controller
www.mysite.com/user/345
Basic controller
www.mysite.com/user/345
app/routes.php
app/controllers/
RESTful controller
GET www.mysite.com/users
GET www.mysite.com/users/admin-profile
POST www.mysite.com/users/profile
app/models/
Views
app/views/
Eloquent Model
Return html to the browser, passing data to it
Blade templating - layouts
Blade templating - some more syntax
...that's it.
User Model corresponds to the ´users´ table
Table column == $user->attribute
Query and manipulate data using Eloquent methods
Relationships
Example: One-to-Many
Forget SQL...
=
Where to learn it
laravel.com
leanpub.com
net.tutsplus.com
laracasts.com
Some features...
puts the pieces together
Laravel = Own components ("Illuminate")
+ external packages, including Symfony components
... and others!
Full transcript