Midwest PHP 2018 Header

Joe used a tutorial he wrote and condensed it into this talk. He ran out of time but I’m amazed at how much he covered in 45 minutes. I also find it interesting that while Symfony and Laravel are competitors they both seem very similar.

Main Take Aways

  • Laravel has a large ecosystem of both free and pay for components made by a wide variety of people.
  • Laravel code is very expressive and favors convention over configuration
  • My spell check hates the word “Laravel”

Things I’m Going to Do

Try Laravel.

My Raw Notes

  • Book options
    • Laravel Up and Running
    • Easy Laravel 5
  • Laravel is a full stack framework
  • If you learn well from videos Laracasts is a good resource
  • Laravel has lots of tools
    • Lumen
    • Envoyer - zero downtime deploys
    • Forge - server management
    • Spark - SaaS for laravel apps
    • Laravel Homestead - VM for Laravel apps
    • Laravel Cashier - Spark but open source
  • LTS - bugs fixes 2 years and security fixes for 3 years
  • LaravelShift.com tool to upgrade from one version to another
  • Can use Laravel application or composer create-project
  • Homestead is a collection of tools to get a Vagrant Box running
    • Has elastic search
    • Can use as a composer dependency
    • Don’t version control Homestead.yaml
    • Throw .example on the end
  • app folder -> our logic
  • In database folder
  • factories to create data
  • migrations to make schema changes
  • public folder
    • index.php does all the work
  • resources folder
    • all assets
    • views folder contains blade templates
  • routes folder
    • one route file for each types (api, channels, console, web)
    • channels - for broadcasting events
  • migrations
    • up method - how to make change
    • down method - how to reverse
    • columns defined through functions
    • Should always write a down function but presenter doesn’t
  • Database seeders
    • Tell how many we want of a type to be created for testing
  • Artisan
    • command line tool
    • artisan make:migration create_widgets_table
    • artisan migrate runs through migrations that haven’t been run yet
    • artisan make:model Widget
  • In model
    • fillable array determines what we’re interested in