SlideServe
Menu
Préférences
© SlideServe · v2026

THE PHP FRAMEWORK FOR WEB ARTISANS

jun avatar
12 diapositives · 443 Views · Jul 22, 2014

THE PHP FRAMEWORK FOR WEB ARTISANS. What is Laravel ?. Developed by Taylor Otwell Web application framework Follows MVC design pattern Expressive syntax. Why use Laravel. Elegant syntax Utilizes the latest PHP features Well documented CLI Tools Eloquent ORM Fun to develop with.

THE PHP FRAMEWORK FOR WEB ARTISANS - slide 1
01 / 12THE PHP FRAMEWORK FOR WEB ARTISANS
1 / 17

Télécharger la présentation

THE PHP FRAMEWORK FOR WEB ARTISANS
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  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 <html> <head> <title>@yield('page_title')</title> </head> <body> Some text @yield('content') </body> </html>

  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.