17
Introductio n to Laravel Tim Bracken Software Engineer PSU Dutton Institute @tjbrak

Laravel Webcon 2015

Embed Size (px)

Citation preview

Introduction toLaravelTim BrackenSoftware EngineerPSU Dutton Institute@tjbrak

How I got here Former Java enterprise developer. Started a new job where PHP was the

most widely known language. Choice between PHP frameworks:

Codeigniter Symfony Yii

Laravel came out as the easiest/most updated java like framework to use.

Why use a framework? Provides structure Adds value Intuitive to use Doesn’t get in the way Personal requests:

Easy REST Portable Scalable

Why Laravel Started with Laravel 4.1

Modern PHP 5.3 stack (PHP 5.5 w/ 5.1) Built on top of Symfony and loosely based

off of Codeigniter Easy to learn Easy to read/understand VERY fast prototyping Follows MVC pattern

What I will be covering MVC Routing Eloquent ORM Blade Templating

Laravel MVC

ViewOnly UI

components

ModelDatabase

with minimal logic

ControllerConnection

between model and

view

RoutingRoute to the

proper controller

Web Request

User submits a request

Routing

Advanced routing

Route::controller(Controller::Detect());

Routing with middleware

Eloquent ORM (Laravel Model)

Naming convention: Model Flight= table flights

Eloquent ORM (Laravel Model)

Eloquent in controller

Blade templating Better Nicer than twig:

Twig: {{ dumb_numbers|abs }} Blade: {{ abs($dumb_numbers) }}

Blade templatingLayout

Blade templatingContent

Route returning data:

Resources Laravel Documentation

http://laravel.com/docs/5.1 Laracasts

https://laracasts.com/ Scotch

https://scotch.io/tag/laravel Larachat/Slack

https://larachat.co/

The end