Laravel for Fun

60187fe0ab07ea5a46572a3ab05f61dd?s=47 Matt Stauffer
February 07, 2018

Laravel for Fun

Laracon Online 2018 - Laracon for Fun (and Profit?)

60187fe0ab07ea5a46572a3ab05f61dd?s=128

Matt Stauffer

February 07, 2018
Tweet

Transcript

  1. (keep it fun)

  2. Science Grandma (story time) for

  3. None
  4. None
  5. None
  6. 100% DIY. !

  7. None
  8. None
  9. None
  10. How do people get podcasts?

  11. Womp womp.

  12. What I want: (What I really, really, want)

  13. SMS Messenger

  14. But how? (patience)

  15. That’s just one story.

  16. https://github.com/mattstauffer/pickfifty Pick 50

  17. mergency.io https://github.com/mattstauffer/mergency

  18. PodcastWar.net https://github.com/mattstauffer/podcastwar

  19. SaaSaaS https://github.com/tightenco/saasaas

  20. This would not be possible/viable without Laravel.

  21. Laravel for Fun and Profit Matt Stauffer @stauffermatt

  22. Matt Stauffer @stauffermatt Laravel for Fun and Profit

  23. The Theory a + b = 180˚ Postulate 22: Angle-Angle

    (AA) Similarity Postulate The sum of the angles a b K L l2 l1 If two angles of one triangle are congruent to two angles of another triangle, then the two triangles are similar.
  24. My whole life I been making apps

  25. … which never make me rich. "

  26. How do I monetize:

  27. GistLog

  28. Symposium

  29. Five-Minute Geek Show

  30. Giscus

  31. Laravel Tricks Bought & removed the ads

  32. It turns out… I don’t care

  33. Matt’s app dev workflow See need Imagine how to meet

    that need as simply as possible Build the ugliest simplest solution Buy a domain Throw it up on Forge Send out a tweet and never look back
  34. Poor Adam Wathan

  35. Not just once or twice. PulledOver Symposium Confomo SimplePodcastSite SmarterThings

    Mergency MarkedStyle
  36. Some never even get finished

  37. Finished… some day? MarvelWatch Suggestive Live Stream Timeline KeepIt140 SimplePodcastSite

    SmarterThings Probably a lot more
  38. I used to feel bad.

  39. None
  40. Paying your bills with Dusk?

  41. … really?

  42. None
  43. None
  44. What if there are other reasons to write code?

  45. https://m.signalvnoise.com/exiting-the-dark-ages-of-capitalism-480f0600f103 DHH “EXITING THE DARK AGES OF CAPITALISM” “Squeezing out

    every last dollar from a relationship will leave it sour and dry. […] It’s a two-dimensional, flat, and antagonistic relationship. It’s also frequently completely unnecessary, and nearly always unsustainable.”
  46. Just because it doesn’t make you rich and famous, it

    doesn’t mean it’s not worth doing.
  47. How we decide which apps to make

  48. Common reasons to build apps Makes me money Makes me

    famous Gets me a job Usable by a large section of the community in a traditional open source context
  49. Making money, getting famous, getting a job, contributing to open

    source, and any other common motivations for building apps are perfectly fine. DISCLAIMER But everyone knows that already.
  50. But… what about… Caleb and the SouthWest Scraper HireMoreVets ReadMarvel.com

    (my apps I mentioned earlier)
  51. Makes me money Makes me famous Gets me a job

    Usable by a large section of the community in a traditional open source context Makes me laugh Makes my kid laugh Makes my friends laugh Would be fun to build I want to try out a fun idea It would help me in a small way It would help my spouse Common reasons to build apps Less common reasons to build apps
  52. “A state where people experience positive emotions, positive psychological functioning

    and positive social functioning, most of the time,” living "within an optimal range of human functioning” Human Flourishing
  53. SharePhotos

  54. None
  55. Using Laravel to do things you couldn’t without it. Laravel

    for Fun Laravel for human flourishing. Enabling a better, fuller life with Laravel.
  56. How we evaluate tools

  57. How would you respond if I had said:
 “I’m doing

    a
 chatbot talk”?
  58. That was me, too… until

  59. None
  60. Clients are asking for it Clients will ask for it

    Can use it to build an app that will bring money/fame Can apply on apps I’m currently running Simplify/replace currently-used tech Common reasons to adopt tech
  61. Clients are asking for it Clients will ask for it

    Can use it to build an app that will bring money/ fame Can apply on apps I’m currently running Simplify/replace currently-used tech It will let my grandma do something cool I can talk with my dog using it My daughter can use it to play her favorite game My spouse will totes appreciate it OMFG I feel like a wizard Common reasons to adopt tech Less common reasons to adopt tech
  62. Speed matters Interlude:

  63. Remember my Rapid Application Development talk a few years ago?

  64. Is the takeaway:
 
 “Less things are worth automating than

    I thought” ?
  65. “The faster I can build, the more things I can

    justify building.”
  66. None
  67. Valet Lambo Eloquent Laravel Frontend Presets Tailwind Autowiring, route model

    binding, routes/ console.php, service discovery, ignoring type hints and return type hints, realtime Facades, etc. Which is why I love…
  68. The simplest Laravel app (1) It's basically Excel/Access... hosted on

    the cloud and shareable among your friends for $5/mo. Karani SmarterThings Symposium MarkedStyle
  69. The simplest Laravel app (2) Or another super simple type:

    just takes some other source of data and manipulates it or responds to it. MarvelWatch SimplePodcastSite Giscus
  70. STORY TIME!

  71. Science Grandma for How I built

  72. Science for Grandma How I Built Step 1: Simplecast

  73. Science for Grandma How I Built Step 2: Publish on

    Apple Podcasts
  74. Science for Grandma How I Built Step 3: Announce on

    Twitter
  75. Science for Grandma How I Built • todo get a

    screenshot of the post Step 4: Announce on Facebook
  76. Science for Grandma How I Built Step 5: LAMBOOOOOOOOOO

  77. Science for Grandma How I Built Step 6: Build Signup

    views
  78. Science for Grandma How I Built Step 7: Create users

    class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('phone_number')->nullable(); $table->string('facebook_id')->nullable(); $table->timestamps(); }); } }
  79. Science for Grandma How I Built Step 8: RSS ->

    notifications Artisan::command('check', function (FeedsFactory $feeds) { $feedItems = $feeds->make(config('subscriber.rss_url'))->get_items(); collect($feedItems)->reject(function ($episode) { return $this->episodeExists($episode); })->each(function ($episode)) { Episode::create(['permalink' => $episode->get_permalink()]); dispatch(new NotifySubscribersOfNewEpisode($episode)); }); })->describe('Check for a new episode, and notify if appropriate.');
  80. Science for Grandma How I Built Step 8: RSS ->

    notifications (2) // Job, notifying all users class NotifySubscribersOfNewEpisode implements ShouldQueue { ... public function handle() { Notification::send( User::all(), new NewEpisodeReleased($this->episode) ); } }
  81. Science for Grandma How I Built Step 8: RSS ->

    notifications (3) // Notification (multi-channel) class NewEpisodeReleased extends Notification { ... public function via($notifiable) { return $notifiable->notificationChannel(); } public function toTwilio($notifiable) { return (new TwilioSmsMessage)->content("Message announcing new episode here"); } public function toFacebook($notifiable) { return FacebookMessage::create("Message announcing new episode here"); } }
  82. Science for Grandma How I Built Step 8: RSS ->

    notifications (4) // User class, specifying notification channel class User { ... public function notificationChannel() { if ($this->phone_number) { return TwilioChannel::class; } if ($this->facebook_id) { return FacebookChannel::class; } throw new Exception('Un-notifiable user'); } }
  83. Science for Grandma How I Built • Lorem ipsum dolor

    sit amet, consectetur adipiscing Page Title ❤ http://laravel-notification-channels.com/
  84. Science for Grandma How I Built Step 9: Hook it

    into Twilio
  85. Science for Grandma How I Built • @todo move some

    stuff into here? Step 9: Hook it into Twilio
  86. Science for Grandma How I Built Step 10: Hook it

    into Facebook… ❌
  87. Science for Grandma How I Built Wherefore art thou, Facebook

    ID?
  88. Science for Grandma How I Built Step 10: Hook it

    into Facebook… %
  89. Science for Grandma How I Built • Lorem ipsum dolor

    sit amet, consectetur adipiscing Step 10: Hook it into Facebook… &
  90. Science for Grandma How I Built • Turns out it

    needs interactivity. Step 11: Get rejected, try again • Modify this for multiple inputs? NOPE.
  91. Science for Grandma How I Built Step 12: Enter Botman

    '
  92. Science for Grandma How I Built Step 12: Enter Botman

    // routes/botman.php $botman->hears('.*(Hi|Hello|Hey).*', function ($bot) { $bot->reply('Hello! What can I do for you today? Try "info" for more information.' }); $botman->hears('.*(info|help).*', function ($bot) { $bot->reply('Info message here but it is too long for Keynote HI LARACON ONLINE'); }); $botman->hears('subscribe.*', function ($bot) { $user = $bot->getUser(); Log::info('FB User subscribed! ' . $user->getId()); User::firstOrCreate(['facebook_id' => $user->getId()]); $bot->reply("You're now subscribed to " . config('app.name') . "!"); }); $botman->hears('unsubscribe.*', function ($bot) { $user = $bot->getUser();
  93. Science for Grandma How I Built Step 13: Flash lights

    (why not?) Zttp::post( 'https://maker.ifttt.com/trigger/new_episode/with/key/' . config('services.ifttt.webhook_key'), [ 'value1' => 'blue', ] ); http://blink.mattstauffer.com/
  94. Science for Grandma How I Built Tweet from @StaufferScience with

    new posts Listen for Facebook messages suggesting videos lil’ man can watch Let lil’ man press a button that releases each new episode Give lil’ man an SMS address he can text science pictures to that auto-posts to Twitter and his web site Step 14+: Future ideas?
  95. Tech we often underestimate Facebook SMS iOS/Android apps Internet of

    Things (see other Laravel Notification Channels) That which reaches people more in the real world/day-to-day:
  96. https://www.twilio.com/blog/2015/03/how-my-dog-sends-selfies.html How I Taught My Dog to Text Me Selfies

    1
  97. http://marcelpociot.de/blog/deploy-your-laravel-forge-sites-with-your-voice Deploy Your Laravel Forge Sites With Your Voice 2

  98. Accept voicemails 3

  99. Super-easy IOT! 4

  100. None
  101. None
  102. IFTTT into your app! IFTTT OUT of your app! the

    possibilities are endless!
  103. What change can I make today?

  104. Change your perspective of what is worth building. Change your

    perspective of what is worth using. Change your perspective of what you're capable of. Work for human flourishing… and fun.
  105. Recognize the power we have to change other people’s lives.

  106. I can do that!
 I’m a programmer!