Advertisement

All the Laravel Things – Up & Running to Making $$

DevOps Expert
Nov. 19, 2016
Advertisement

More Related Content

Advertisement

More from Joe Ferguson(20)

Advertisement

All the Laravel Things – Up & Running to Making $$

  1. 20162016
  2. All the Laravel things: up and running to making $$ Joe Ferguson
  3. Who Am I? Joe Ferguson PHP Developer Engineer @ Aol. Twitter: @JoePFerguson Organizer of @MemphisPHP OSMI Board Member @NomadPHP Lightning Talks Passionate about Community
  4. For Further Reading laravelupandrunning.com easylaravelbook.com
  5. What exactly is Laravel?
  6. Laravel Ecosystem FrameworkTools Learning & Community
  7. Quick note on versions 5.1 LTS bug fixes for 2 years, security fixes for 3 years Non LTS: bug fixes for 6 months, security fixes for 1 year 5.1 is currently the only LTS version
  8. Which version should you use? 5.3 for my own projects 5.1 for client projects
  9. Getting Laravel composer global require “laravel/installer”
  10. Installing Laravel laravel new quickstart-basic-5.3
  11. Install via Composer composer create-project --prefer-dist laravel/laravel blog
  12. Local Dev Environment
  13. What’s in Homestead • Ubuntu 16.04 • PHP 7.0 • HHVM • Nginx • MySQL • MariaDB • Sqlite3 • Postgres • Composer • NodeJS • Bower • Grunt • Gulp • Beanstalkd • Memcached • Redis
  14. Getting Homestead git clone https://github.com/laravel/homestead.git Homestead
  15. Getting Homestead cd Homestead && bash init.sh
  16. How I use Homestead composer require —dev laravel/homestead
  17. Make Homestead ./vendor/bin/homested make —aliases
  18. What is —aliases?
  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. Questions?
  28. Getting Started with Laravel
  29. Project Structure
  30. app Folder
  31. config Folder
  32. database Folder
  33. public Folder
  34. resources Folder
  35. routes Folder
  36. Model Factories database/factories/ModelFactory.php
  37. User Migration up() database/migrations
  38. User Migration down() database/migrations
  39. Database Seeders
  40. Artisan Commands
  41. Artisan Commands
  42. Create Migration artisan make:migration create_widgets_table
  43. Create Migration
  44. Create Migration
  45. Run Migration(s) artisan migrate
  46. Inspect the Database Password is “secret”
  47. Inspect the Database
  48. Create a model artisan make:model Widget
  49. Widget model
  50. Add Widget ModelFactory database/factories/ModelFactory.php
  51. Create a seeder artisan make:seeder WidgetSeeder
  52. WidgetSeeder
  53. DatabaseSeeder
  54. Run Database Seeders artisan db:seed
  55. Users Table
  56. Widgets Table
  57. Routing routes/web.php
  58. Why 3 route files?!
  59. Add /widgets Route
  60. localhost:8000/widgets
  61. Frontend Development
  62. Run: npm install
  63. Run: gulp
  64. Compiled Assets
  65. Layouts
  66. Example View
  67. Return a view() routes/web.php
  68. Refresh /widgets localhost:8000/widgets
  69. Clean up our layout
  70. Widgets Index View
  71. Pass data to a view routes/web.php
  72. localhost:8000/widgets
  73. Questions?
  74. Testing our Application
  75. Testing our Widgets
  76. Testing our Widgets
  77. Testing our Widgets
  78. Running phpunit
  79. Route Groups
  80. Form Requests
  81. WidgetCreateRequest
  82. HTML Forms
  83. Widget Routes
  84. Add Widget
  85. Test Add Widget Form
  86. Questions?
  87. Controllers
  88. Routing to Controllers
  89. Routing to Controllers
  90. Routing to Controllers
  91. Widget Tests Still Pass
  92. Questions?
  93. Model Relationships One to One A User has a Phone Number One to Many A Post has many Comments Many to Many Users have may Roles
  94. Task belongs to User
  95. User has many Tasks
  96. Query Model Relationships
  97. The N+1 Problem
  98. Eager Loading
  99. Questions?
  100. How do we get it to the server?
  101. Envoy Envoy provides easy ways to run command commands on remote servers such as pulling code from git, running artisan commands, etc. Envoy uses blade template syntax Envoy only supports Mac & Linux
  102. Sample Envoy Config
  103. Sample Envoy Config
  104. Envoy Configuration
  105. Easy OAuth Login
  106. Laravel Socialite Easily allow users to authenticate via Github, Google, Twitter, Facebook, Bitbucket, or Linkedin Handles almost all the boilerplate for you https://github.com/laravel/socialite
  107. composer require laravel/socialite
  108. Configure Socialite
  109. Configure Socialite
  110. AuthController
  111. Add Socialite Routes
  112. Making $$$
  113. Laravel Cashier Expressive interface to Stripe and Braintree subscription billing services Free, open source package easily added to Laravel Designed for subscription, not one off charges https://laravel.com/docs/5.3/billing
  114. Installing Cashier
  115. Configure Cashier
  116. Cashier Migration
  117. Billable Trait
  118. Stripe API Keys
  119. Subscribing a User https://laravel.com/docs/5.3/billing
  120. Laravel Spark SASS in a box You bring the Service Spark brings the boilerplate of billing, authentication, and more $99 For a single site $299 For unlimited sites
  121. Laravel Spark
  122. Questions?
  123. Artisan Commands
  124. Create a new Command
  125. Create a new Command
  126. app/Console/Kernel.php
  127. BasicCommand.php
  128. Signature
  129. Description
  130. Constructor
  131. Handle The Command
  132. Running our Command
  133. Output Some Text
  134. Output Some Text
  135. Output Warning Text
  136. Output Warning Text
  137. Output Error Text
  138. Output Error Text
  139. Questions?
  140. Authentication
  141. artisan make:auth
  142. View Files
  143. Auth Routes
  144. Layout :(
  145. Register a new user
  146. Logged In User
  147. Add our Navigation
  148. http://localhost:8000
  149. localhost:8000/widgets
  150. Multiple Middleware
  151. Not Logged In?
  152. Test Errors and Failure
  153. Run test as a user
  154. Test now passes
  155. Questions?
  156. Laravel Forge “A simple way to deploy your Laravel applications onto blazing fast servers”
  157. Forge is Homestead and more in the cloud
  158. Forge is not a server host
  159. Forge uses your servers
  160. Forge uses any* server *Any Internet accesible Ubuntu 14.04 x64 Server
  161. Laravel Forge • Unlimited Servers. • Unlimited Sites. • Unlimited Deployments. • Push To Deploy. Laravel Forge Plus • Share Servers With Teammates. • Unlimited Servers. • Unlimited Sites. • Unlimited Deployments. • Push To Deploy. $15/Month $140/Year $30/Month $300/Year
  162. Adding Servers To Forge
  163. Adding a site to a server
  164. Adding a ssh key to a server
  165. Adding scheduled (cron) jobs
  166. Adding daemons (supervisor)
  167. Creating server networks
  168. Server Monitoring
  169. Update Server Meta Data
  170. Adding our hello-world site
  171. Install our Git Repository
  172. Configure App Deployment
  173. Deploy!
  174. Deploy! Continuous Delivery!
  175. Deployment Log
  176. Setting Environment Variables
  177. Queue Workers
  178. Configure / Install SSL
  179. LetsEncrypt.org 100% Supported
  180. Envoyer.io
  181. Zero Downtime Deployments with Envoyer.io
  182. Envoyer 10 Projects - $10/month or $100/year 20 Projects - $20/month or $200/year Envoyer Plus Unlimited Projects - $50/month or $500/year Envoyer Premium
  183. Add a project
  184. Adding a Server
  185. Add the SSH key from Envoyer
  186. Test Connection Status Envoyer now connected to our Forge Server
  187. Project Path
  188. Our first Deployment
  189. Deployment Recap
  190. Deploy when code is pushed
  191. Free Video Series at Laracasts https://laracasts.com/series/envoyer https://envoyer.io/docs
  192. Questions?
  193. Feedback! https://joind.in/talk/4eb90 Joe Ferguson Twitter: @JoePFerguson Email: joe@joeferguson.me Freenode: joepferguson Contact Info:
Advertisement