laravel introduction

50
Introduction

Upload: simon-funk

Post on 12-Jan-2017

276 views

Category:

Technology


3 download

TRANSCRIPT

Laravel Introduction

Introduction

Who am I?Simon Funk

CEO and founder of Tree Stones web agency

Passionate Webdeveloper and Laravel enthusiast

Always interested for new technology and innovations

When I discovered Laravel

What is Laravel?PHP Framework for Artisans

First release 2011

Built on top of Symfony2 Components

MVC based

Like any framework, provides services and libraries to make interaction with web requests and other services

Laravel PhilosophyLove beatiful code

Has expressive, elegant syntax

Attempts to take the pain out of development (authentication, routing, sessions, and caching)

Providing powerful tools needed for large, robust applications

Happy developers make the best code

Who is behind?

Taylor Otwell

Google Trend

The InstallationLarave is based on Composer

Installation via Laravel Installer

Installation via Composer

Laravel folder structer

ControllersModelsViews

The BasicsRouting

Controllers

Templating (Blade)

ORM (Eloquent)

RoutingHandles the HTTP requests

GET, POST, PUT, PATCH, DELETE

Routes are defined in routes.php

Routes can uses a closure

Or you can use a Controller

Routing

Route Listimage

Controller

Blade Laravel default template engine

Files need to use .blade.php extension

Driven by inheritance and sections

Extensible for adding new custom contol structures (directives)

Define a Blade Layout

Using a Blade Layout

Eloquent (ORM)Active Record

Table plural, snake_case class name

Migrations

Support relationship

Soft deleting

Timestamp

Migration & SeederMigration

Seeder

Model

ArtisanLaravel CLI, command php artisan do:somtehing

Uses the Symfony Console component

Manage table migrations, seed tables, create resourceful controllers

Many more

Artisan

Service ContainerManages class depencies

Based on dependency injection method

Dependencies are injected at run-time

Allowing dependencies to be easily swapped

Service Container

Service ProvidersAct like component bootstrap

Group related Service Container registrations in one place

Can also run other functionalities like artisan command

Service Providers

Facades What are they?Facade::doSomethingCool()

Isnt that a static method?Well, no

Facades What are they?A static access to underlying service

Lool like static resources, but actually uses services underneath

Classes are resolved via Service Containers

FacadesLaravel has a lot usefull usages of Facades likeApp::config()View::make()DB::table()Mail::send()Request::get()Session::get()Url::route()And much more

QueueProvides a unified API across queue back-ends

Interface to Amazon SQSIronMQRedis queuesBeanstalkdSync calls job inline

MiddlewareAllows processing or filtering of requests entering the system

Example: Authentication, manipulation of content

EncryptionSimplified encryption using mcrypt

Available as Facade Crypt::(secret)

FilesystemAbstraction layer to filesystemLocal filesystemAmaron S3Rackspace Cloud StorageFTP/SFTPDropbox

Uses the league/flysystem library

AuthenticationInlcudes libraries to do basic username/password authentication out of the box

Includes password recovery (Forgot password)

Protecting routes using filters

TestingTesting Toolset

Supports PHPUnit out of the box

Easy to get started with Composer

Allows you to simulate a web browser

Support Mockery

EcosystemLaravel

Lumen

Socialite

Cashier

Elixir

Envoyer

Spark (coming soon)

Homestead

Forge

LumenMicor-framework for Micro-services

Sacrifices configurability for speed

Easy upgrade to a full Laravel application

SocialiteIntegrates Social authentication functionality

Almost for all popular platforms available

http://socialiteproviders.github.io

CashierBilling without the hassle

Subscription logic included

Easy to setup

EnvoyA simple deployment solution

Handles SSH tasks

Deploy on miltiple servers at onve

ElixirGulp simplified

Compilation, concatenation, minifaction, auto-prefixing,

Support forSource MapsCoffeScriptBrowserifyBabel

Spark (coming soon)BillingTeam managementInvitationsRegistration2-factor auth

HomesteadComes with everything you needUbuntuPHP 5.6 & 7NginxMySQL & PostgresNodeMemcached

ForgeAutomates the process to setup a server

You dont need to learn how to set up one

Saves you the effort of settings everything up

Globally, saves you ridiculous amounts of time

Envoyer (!= Envoy)Zero downtime deployments

Seamless rollbacks

Cronjobs monitoring with heartbeats

Deployment health status

CommunitySlackhttp://larachat.co/ Forumhttps://laracasts.com/discussForumhttp://laravel.io/forum Twitterhttps://twitter.com/laravelphpGitHubhttps://github.com/laravel/laravel

ConferenceLaraconUSJuly 27-29, Kentucky USAhttp://laracon.us/

LaraconEUAugust 23-24, Amsterdam NL http://laracon.eu

LearningLaravel Documentationhttps://laravel.com/

Laracastshttps://laracasts.com/

CMS

AsgardCMShttps://asgardcms.com/

OctoberCMShttp://octobercms.com/

Thank you!Questions?