Intro to Laravel and getting started in the Laravel Ecosystem MidwestPHP 2018

Intro to Laravel and getting started in the Laravel Ecosystem MidwestPHP 2018

Join us for an evening to take a tour around the Laravel PHP Framework. We'll explore the basics of getting started and tour around the Laravel Ecosystem including local development with Homestead, deployment with Envoy, and building your next great application idea. We'll explore the basics of databases, routing, views, and then into the deep end with model relationships, form requests, testing, and more!

Fef6ec2170ad1ecfcacdf2ead305f040?s=128

Joe Ferguson

March 09, 2018
Tweet

Transcript

  1. Intro to Laravel and getting started in the Laravel Ecosystem

    Joe Ferguson
  2. Who Am I? Joe Ferguson PHP Developer PHP Architect @

    Ministry Brands Twitter: @JoePFerguson Organizer of @MemphisPHP OSMI Board Member Certified Laravel Developer Drone Racing Pilot
  3. For Further Reading laravelupandrunning.com easylaravelbook.com

  4. What exactly is Laravel?

  5. Laravel Ecosystem Framework Tools Learning & Community

  6. Quick note on versions 5.5 LTS bug fixes for 2

    years, security fixes for 3 years Non LTS: bug fixes for 6 months, security fixes for 1 year
  7. 5.5 is the current LTS

  8. Which version should you use? https://www.reddit.com/r/laravel/comments/5v5mo8/ laravel_55_will_be_the_next_lts_release/ddzwwf9/

  9. LaravelShift.com

  10. Getting Laravel composer global require “laravel/installer”

  11. Installing Laravel laravel new quickstart-basic-5.5

  12. Install via Composer composer create-project --prefer-dist laravel/laravel quickstart-5.5

  13. Local Dev Environment

  14. What’s in Homestead •Ubuntu 16.04 •PHP 5.6 •PHP 7.0 •PHP

    7.1 •PHP 7.2 •Nginx •MySQL •MariaDB •Sqlite3 •Postgres •MailHog •Composer •NodeJS •Bower •Grunt •Gulp •Beanstalkd •Memcached
  15. Getting Homestead git clone https://github.com/laravel/homestead.git Homestead

  16. Getting Homestead cd Homestead && bash init.sh

  17. How I use Homestead composer require —dev laravel/homestead

  18. Make Homestead ./vendor/bin/homested make

  19. Configuring Homestead

  20. Starting Homestead

  21. Inspecting Homestead

  22. Edit /etc/hosts Optional for per project Homestead

  23. Inspecting Homestead

  24. Inspecting Homestead

  25. Stopping Homestead

  26. Don’t version control Homestead.yaml

  27. Getting Started with Laravel

  28. Project Structure

  29. app Folder

  30. config Folder

  31. database Folder

  32. public Folder

  33. resources Folder

  34. routes Folder

  35. Model Factories database/factories/UserFactory.php

  36. User Migration up() database/migrations

  37. User Migration down() database/migrations

  38. Database Seeders

  39. Artisan Commands

  40. Artisan Commands

  41. Create Migration artisan make:migration create_widgets_table

  42. Create Migration

  43. Create Migration

  44. Run Migration(s) artisan migrate

  45. Inspect the Database Password is “secret”

  46. Inspect the Database

  47. Create a model artisan make:model Widget

  48. Widget model

  49. Add Widget ModelFactory

  50. Create a seeder artisan make:seeder WidgetSeeder

  51. WidgetSeeder

  52. DatabaseSeeder

  53. Run Database Seeders artisan db:seed

  54. Users Table

  55. Widgets Table

  56. Routing routes/web.php

  57. Why 4 route files?!

  58. Add /widgets Route

  59. localhost:8000/widgets

  60. Frontend Development

  61. Run: npm install

  62. npm run dev

  63. Compiled Assets

  64. Layouts

  65. Example View

  66. Return a view() routes/web.php

  67. Refresh /widgets localhost:8000/widgets

  68. Clean up our layout

  69. Widgets Index View

  70. Pass data to a view routes/web.php

  71. localhost:8000/widgets

  72. Joe Ferguson Twitter: @JoePFerguson Email: joe@joeferguson.me Freenode: joepferguson Contact Info:

    Feedback! https://joind.in/talk/cef75