Slide 1

Slide 1 text

The Laravel Ecosystem

Slide 2

Slide 2 text

Hi! I'm Dries

Slide 3

Slide 3 text

I lead the BeatSwitch development team Festival Management Software beatswitch.com

Slide 4

Slide 4 text

I maintain Laravel.io The Laravel Community Portal

Slide 5

Slide 5 text

I organize PHP Antwerp 2 meetups so far 120 developers meetup.com/phpantwerp

Slide 6

Slide 6 text

What will I not be talking about?

Slide 7

Slide 7 text

Not a sales talk

Slide 8

Slide 8 text

No how-to's Check out laracasts.com for some great tutorials

Slide 9

Slide 9 text

The Laravel Ecosystem

Slide 10

Slide 10 text

Developer happiness, from download to deploy

Slide 11

Slide 11 text

We spend so much time crafting amazing applications But often fail to find time to improve our workflow

Slide 12

Slide 12 text

Web development today isn't web development from 10 years ago

Slide 13

Slide 13 text

~2002 HTML, CSS, JavaScript, PHP, SQL

Slide 14

Slide 14 text

2015 HTML, CSS, JavaScript, PHP, SQL, Virtual Machines, Vagrant, NoSQL, SSH, Git, PSR's, Grunt, Gulp, Node.js, Bower, Homebrew, OAuth, Frameworks, ORM, JSON, jQuery, Bootstrap, Angular, Composer, Unit Testing, Caching, Queues, TDD, DDD, BDD, Templating, Middleware1 1 http://alexking.org/blog/2015/05/14/web-development-now-complicated

Slide 15

Slide 15 text

We’ve Made Web Development Complicated 1 Alex King

Slide 16

Slide 16 text

Full Stack is an abused term

Slide 17

Slide 17 text

What is a Full Stack developer?2 1. Server, Network, and Hosting Environment 2. Data Modeling 3. Business Logic 4. API layer / Action Layer / MVC 5. User Interface 6. User Experience 7. Understanding what the customer and the business need 2 http://www.laurencegellert.com/2012/08/what-is-a-full-stack-developer/

Slide 18

Slide 18 text

There's so much to learn

Slide 19

Slide 19 text

Does anyone recognize themselves in this?

Slide 20

Slide 20 text

Not everyone has time to learn All The Things™

Slide 21

Slide 21 text

I can't learn everything

Slide 22

Slide 22 text

What if the tools we use didn't require us to learn everything?

Slide 23

Slide 23 text

Laravel offers an ecosystem which enables developers to focus on what's important

Slide 24

Slide 24 text

The Framework

Slide 25

Slide 25 text

It brings code back to the essence // Zend $route = Literal::factory([ 'route' => '/foo', 'defaults' => [ 'controller' => 'foo', 'action' => 'index', ], ]); $router->addRoute('foo', $route); // Laravel Route::get('foo', 'FooController@index');

Slide 26

Slide 26 text

It hides complexity // Doctrine $criteria = new \Doctrine\Common\Collections\Criteria(); $criteria->where($criteria->expr()->gt('votes', 100)) ->andWhere($criteria->expr()->eq('active', 1)); $posts = $em->getRepository('Post')->matching($criteria); // Eloquent $posts = Post::where('votes', '>', 100) ->where('active', 1) ->get(); // Eloquent (using query scopes) $posts = Post::popular()->active()->get();

Slide 27

Slide 27 text

It's clean and readable // Symfony $client = static::createClient(); $client->request('GET', '/post/hello-world'); $this->assertContains( 'Hello World', $client->getResponse()->getContent() ); // Laravel (Thanks Jeffrey!) $this->visit('/post/hello-world') ->see('Hello World');

Slide 28

Slide 28 text

It simplifies complex topics // Cron jobs in Laravel $schedule->command('cache:clear') ->hourly() ->sendOutputTo($logFile) ->emailOutputTo('[email protected]');

Slide 29

Slide 29 text

Laravel has become an essential tool in the workflow of many developers

Slide 30

Slide 30 text

You can even use the components separately github.com/mattstauffer/IlluminateNonLaravel

Slide 31

Slide 31 text

Laravel enables Rapid Application Development (RAD)

Slide 32

Slide 32 text

It allows ideas to come to life in a small amount of time

Slide 33

Slide 33 text

A lot of people think that RAD is a problem

Slide 34

Slide 34 text

But it really just depends on the situation

Slide 35

Slide 35 text

Laravel only limits you to do something when you choose to see it like that

Slide 36

Slide 36 text

Lumen

Slide 37

Slide 37 text

Lumen 4 Micro-framework for Micro-services 4 Sacrifices configurability for speed 4 Easy upgrade to a full Laravel application

Slide 38

Slide 38 text

The Extensions

Slide 39

Slide 39 text

Socialite

Slide 40

Slide 40 text

Social authentication has never been easier public function redirectToProvider() { return Socialite::driver('github')->redirect(); } public function handleProviderCallback() { $user = Socialite::driver('github')->user(); // register user }

Slide 41

Slide 41 text

Need more providers? Flickr, DigitalOcean, Meetup, Paypal, Slack, Trello, Mailchimp, Youtube, Uber, Instagram, Foursquare, Dropbox, Dribbble, Jira, Disqus, SoundCloud, Spotify, Reddit, ... ...and many more socialiteproviders.github.io

Slide 42

Slide 42 text

Cashier

Slide 43

Slide 43 text

Billing without the hassle // Create a subscription $user->subscription('monthly')->create($creditCardToken); // Change a user's plan $user->subscription('premium')->swap(); // Cancel a subscription $user->subscription()->cancel();

Slide 44

Slide 44 text

Envoy

Slide 45

Slide 45 text

A simple deployment solution @servers(['web' => '192.168.1.1']) @task('deploy', ['on' => 'web']) cd site git pull origin {{ $branch }} php artisan migrate @endtask

Slide 46

Slide 46 text

A simple deployment solution 4 Handles SSH tasks 4 Deploy on multiple servers at once 4 Can be configured like Envoyer: serversforhackers.com/video/deploying-with- envoy-cast 4 Also check out Rocketeer: rocketeer.autopergamene.eu

Slide 47

Slide 47 text

We couldn't forget about those front-enders now, could we?

Slide 48

Slide 48 text

Elixir

Slide 49

Slide 49 text

Gulp Simplified3 elixir(function(mix) { mix.sass('app.scss') .scripts(['jquery.js', 'app.js']) .phpUnit() .phpSpec(); }); Compilation, concatenation, minification, auto-prefixing, ... 3 how's that even possible?

Slide 50

Slide 50 text

Support for 4 Source Maps 4 CoffeeScript 4 Browserify 4 Babel 4 ...

Slide 51

Slide 51 text

Versioning / Cache Busting elixir(function(mix) { mix.version('css/app.css'); }); css/app-22c7eedf.css

Slide 52

Slide 52 text

Laravel Spark ⚡ Coming Soon

Slide 53

Slide 53 text

Named after a dear community member

Slide 54

Slide 54 text

Just messing with you !

Slide 55

Slide 55 text

Spark provides a base for SaaS apps 4 Billing 4 Team management 4 Invitations 4 Registration 4 2-factor auth 4 ...

Slide 56

Slide 56 text

Recap 4 Simple and elegant code 4 Hides complexity 4 Powerful extensions 4 RAD

Slide 57

Slide 57 text

But what about our development environment?

Slide 58

Slide 58 text

“It works on my computer” 1 Every developer ever

Slide 59

Slide 59 text

Virtualization to the rescue!

Slide 60

Slide 60 text

Such devops, very learn, much difficult

Slide 61

Slide 61 text

Luckily there's help 4 PuPHPet 4 Phansible (By @erikaheidi) 4 Protobox 4 Vaprobash (By @fideloper)

Slide 62

Slide 62 text

Homestead

Slide 63

Slide 63 text

Comes with everything you need 4 Ubuntu 14.04 4 PHP 5.6 & HHVM 4 Nginx 4 MySQL & Postgres 4 Node 4 Memcached 4 ...

Slide 64

Slide 64 text

Use it with VirtualBox or VMware

Slide 65

Slide 65 text

Easy configuration Configure synced folders folders: - map: ~/Code to: /home/vagrant/Code Configure Nginx sites sites: - map: homestead.app to: /home/vagrant/Code/Laravel/public

Slide 66

Slide 66 text

Easily configure things like Blackfire.io Configure blackfire: - id: your-server-id token: your-server-token client-id: your-client-id client-token: your-client-token And run homestead provision

Slide 67

Slide 67 text

Install per-project Thanks to Joe P Ferguson! (@joepferguson) composer require laravel/homestead --dev php vendor/bin/homestead make vagrant up

Slide 68

Slide 68 text

Homestead offers many benefits 4 Get devs up and running quickly 4 Quickly get an new app set up 4 Get your devs on the same environment 4 Same environment as your Forge servers

Slide 69

Slide 69 text

To the clouds!

Slide 70

Slide 70 text

Configuring servers isn't the easiest task

Slide 71

Slide 71 text

Luckily, there's help serversforhackers.com digitalocean.com/community/tutorials

Slide 72

Slide 72 text

Forge

Slide 73

Slide 73 text

Forge is awesome 4 Automates the process to setup a server 4 You don't need to learn how to set up one 4 Saves you the effort of setting everything up 4 Globally, saves you ridiculous amounts of time

Slide 74

Slide 74 text

Comes with tons of benefits 4 Create load balancers 4 Easily setup tools like New Relic, Papertrail, Blackfire.io 4 Easily setup cronjobs 4 Auto deploy your code 4 Same environment as Homestead

Slide 75

Slide 75 text

You can set up 4 A Load Balancer 4 A couple of servers 4 SSL Certificate 4 New Relic, Papertrail & Blackfire.io 4 Cronjobs, Queue workers In less than 30 minutes

Slide 76

Slide 76 text

But how do we easily get our code deployed?

Slide 77

Slide 77 text

Envoyer

Slide 78

Slide 78 text

Envoyer ≠ Envoy

Slide 79

Slide 79 text

Envoyer offers 4 Zero downtime deployments 4 Seamless rollbacks 4 Cron jobs monitoring with heartbeats 4 Deployment health status

Slide 80

Slide 80 text

Envoyer is optimized for Laravel But can easily be used for any project

Slide 81

Slide 81 text

The Missing Links

Slide 82

Slide 82 text

Continuous Delivery

Slide 83

Slide 83 text

tests.sh #!/bin/bash PHPUNIT_RESULT=`vendor/bin/phpunit` PHPSPEC_RESULT=`vendor/bin/phpspec run` if [[ ${PHPUNIT_RESULT} =~ FAILURES ]] || [[ ${PHPSPEC_RESULT} =~ failed ]] then echo "Test have failed!"; echo ${PHPUNIT_RESULT}; echo ${PHPSPEC_RESULT}; # Notify Slack? else # Trigger deployment curl -s 'https://envoyer.io/deploy/this-is-a-dummy-url'; echo 'Deployment triggered!' fi

Slide 84

Slide 84 text

How to set it up? 4 Create a new Forge instance 4 Add the code below as deploy script 4 Enable quick deploy cd /home/forge/default git pull origin master composer install --dev ./tests.sh

Slide 85

Slide 85 text

Quality Assurance

Slide 86

Slide 86 text

This ecosystem saves you money 4 Laravel: Free 4 Homestead: Free 4 Forge: $10 per month (unlimited servers) 4 Envoyer: $10 per month (10 projects) 4 DigitalOcean or Linode: $10 per month Total: ~$30 per month / ~$360 per year

Slide 87

Slide 87 text

Use them separately 4 Laravel to build something amazing 4 Elixir to optimize your frontend workflow 4 Homestead to develop your PHP apps 4 Forge to setup your servers 4 Envoyer to deploy your apps

Slide 88

Slide 88 text

Together they make an amazing Ecosystem Laravel, Lumen, Spark, Socialite, Cashier, Elixir, Homestead, Forge, Envoyer

Slide 89

Slide 89 text

But what's an ecosystem without an amazing community?

Slide 90

Slide 90 text

Some prominent community members 4 Taylor Otwell 4 Jeffrey Way 4 Eric Barnes 4 Graham Campbell 4 Matt Stauffer 4 Dayle Rees

Slide 91

Slide 91 text

But what about the others?

Slide 92

Slide 92 text

No, not those others!

Slide 93

Slide 93 text

I mean these people! Pic by Matt Stauffer

Slide 94

Slide 94 text

Maxime Fabre @anahkiasen 4 Developer at madewithlove 4 Creator of Rocketeer rocketeer.autopergamene.eu

Slide 95

Slide 95 text

Mior Muhammad Zaki @crynobone 4 Founder of the Orchestra Platform orchestraplatform.com

Slide 96

Slide 96 text

Fortrabbit - PaaS Hosting Meet Frank Lämmer, Oliver Stark & Ulrich Katz

Slide 97

Slide 97 text

Dan Syme @dansyme 4 Owner of Cartalyst cartalyst.com 4 Blogger 4 Invests a lot in the Laravel Community

Slide 98

Slide 98 text

Barry Van Den Heuvel @barryvdh 4 Founder of Fruitcake Studio fruitcakestudio.nl 4 Creator of Laravel Debugbar, Laravel IDE Helper, and many other packages

Slide 99

Slide 99 text

Joe Ferguson @JoePFerguson 4 Conference Speaker 4 Blogger

Slide 100

Slide 100 text

Abigail Otwell @abigailotwell 4 Laravel's biggest supporter 4 Founder of LaraBelle larabelleclothing.com

Slide 101

Slide 101 text

Jeroen Gerits @JeroenGerits 4 Freelance Web Developer 4 Conference Organiser webengineers.io

Slide 102

Slide 102 text

Why do I spend so many time talking about these people?

Slide 103

Slide 103 text

Because it matters

Slide 104

Slide 104 text

How can the community help you?

Slide 105

Slide 105 text

Talk to fellow Artisans when you're stuck #laravel on IRC Larachat.co stackoverflow.com laracasts.com/discuss laravel.io

Slide 106

Slide 106 text

Send in a pull request

Slide 107

Slide 107 text

Create an open-source project

Slide 108

Slide 108 text

Dive into the core github.com/laravel/framework

Slide 109

Slide 109 text

! Channelling my inner Coderabbi ! Start a user group meetup.com

Slide 110

Slide 110 text

Start talking!

Slide 111

Slide 111 text

Open-Source isn't only about opening up your code to others It's also about opening up yourself to others

Slide 112

Slide 112 text

Learn from each other Talk to each other Build amazing things together

Slide 113

Slide 113 text

Don't forget the rest of the PHP community

Slide 114

Slide 114 text

Do what you love and only what you love, regardless of how much someone is willing to pay you to do otherwise 1 Lee Tengum @ThatLeeGuy

Slide 115

Slide 115 text

The best ecosystem is still a helpful, diverse and respectful community

Slide 116

Slide 116 text

Thank you! !

Slide 117

Slide 117 text

joind.in/15014