This would not be
possible/viable
without Laravel.
Slide 21
Slide 21 text
Laravel for Fun and Profit
Matt Stauffer
@stauffermatt
Slide 22
Slide 22 text
Matt Stauffer
@stauffermatt
Laravel for Fun and Profit
Slide 23
Slide 23 text
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.
Slide 24
Slide 24 text
My whole life
I been making
apps
Slide 25
Slide 25 text
… which
never make
me rich.
"
Slide 26
Slide 26 text
How do I monetize:
Slide 27
Slide 27 text
GistLog
Slide 28
Slide 28 text
Symposium
Slide 29
Slide 29 text
Five-Minute
Geek Show
Slide 30
Slide 30 text
Giscus
Slide 31
Slide 31 text
Laravel
Tricks
Bought &
removed the ads
Slide 32
Slide 32 text
It turns out…
I don’t care
Slide 33
Slide 33 text
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
Slide 34
Slide 34 text
Poor
Adam
Wathan
Slide 35
Slide 35 text
Not just
once or
twice.
PulledOver
Symposium
Confomo
SimplePodcastSite
SmarterThings
Mergency
MarkedStyle
Slide 36
Slide 36 text
Some never even
get finished
Slide 37
Slide 37 text
Finished…
some day?
MarvelWatch
Suggestive
Live Stream Timeline
KeepIt140
SimplePodcastSite
SmarterThings
Probably a lot more
Slide 38
Slide 38 text
I used to feel bad.
Slide 39
Slide 39 text
No content
Slide 40
Slide 40 text
Paying your bills
with Dusk?
Slide 41
Slide 41 text
… really?
Slide 42
Slide 42 text
No content
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
What if there are
other reasons to
write code?
Slide 45
Slide 45 text
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.”
Slide 46
Slide 46 text
Just because it doesn’t
make you rich and
famous, it doesn’t mean
it’s not worth doing.
Slide 47
Slide 47 text
How we
decide which
apps to make
Slide 48
Slide 48 text
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
Slide 49
Slide 49 text
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.
Slide 50
Slide 50 text
But… what about…
Caleb and the SouthWest Scraper
HireMoreVets
ReadMarvel.com
(my apps I mentioned earlier)
Slide 51
Slide 51 text
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
Slide 52
Slide 52 text
“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
Slide 53
Slide 53 text
SharePhotos
Slide 54
Slide 54 text
No content
Slide 55
Slide 55 text
Using Laravel to do
things you couldn’t
without it.
Laravel for Fun
Laravel for
human
flourishing.
Enabling a better,
fuller life with
Laravel.
Slide 56
Slide 56 text
How we
evaluate
tools
Slide 57
Slide 57 text
How would you
respond if I had
said:
“I’m doing a
chatbot talk”?
Slide 58
Slide 58 text
That was me, too… until
Slide 59
Slide 59 text
No content
Slide 60
Slide 60 text
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
Slide 61
Slide 61 text
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
Slide 62
Slide 62 text
Speed matters
Interlude:
Slide 63
Slide 63 text
Remember my
Rapid Application
Development talk
a few years ago?
Slide 64
Slide 64 text
Is the
takeaway:
“Less things are
worth automating
than I thought”
?
Slide 65
Slide 65 text
“The faster I can build,
the more things I can
justify building.”
Slide 66
Slide 66 text
No content
Slide 67
Slide 67 text
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…
Slide 68
Slide 68 text
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
Slide 69
Slide 69 text
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
Slide 70
Slide 70 text
STORY
TIME!
Slide 71
Slide 71 text
Science
Grandma
for
How I built
Slide 72
Slide 72 text
Science for Grandma
How I Built
Step 1: Simplecast
Slide 73
Slide 73 text
Science for Grandma
How I Built
Step 2: Publish on Apple Podcasts
Slide 74
Slide 74 text
Science for Grandma
How I Built
Step 3: Announce on Twitter
Slide 75
Slide 75 text
Science for Grandma
How I Built
• todo get a screenshot of
the post
Step 4: Announce on Facebook
Slide 76
Slide 76 text
Science for Grandma
How I Built
Step 5: LAMBOOOOOOOOOO
Slide 77
Slide 77 text
Science for Grandma
How I Built
Step 6: Build Signup views
Slide 78
Slide 78 text
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();
});
}
}
Slide 79
Slide 79 text
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.');
Slide 80
Slide 80 text
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)
);
}
}
Slide 81
Slide 81 text
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");
}
}
Slide 82
Slide 82 text
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');
}
}
Slide 83
Slide 83 text
Science for Grandma
How I Built
• Lorem ipsum dolor sit amet, consectetur
adipiscing
Page Title ❤
http://laravel-notification-channels.com/
Slide 84
Slide 84 text
Science for Grandma
How I Built
Step 9: Hook it into Twilio
Slide 85
Slide 85 text
Science for Grandma
How I Built
• @todo move some stuff into here?
Step 9: Hook it into Twilio
Slide 86
Slide 86 text
Science for Grandma
How I Built
Step 10: Hook it into Facebook…
❌
Slide 87
Slide 87 text
Science for Grandma
How I Built
Wherefore art thou, Facebook ID?
Slide 88
Slide 88 text
Science for Grandma
How I Built
Step 10: Hook it into Facebook…
%
Slide 89
Slide 89 text
Science for Grandma
How I Built
• Lorem ipsum dolor sit amet, consectetur
adipiscing
Step 10: Hook it into Facebook…
&
Slide 90
Slide 90 text
Science for Grandma
How I Built
• Turns out it needs interactivity.
Step 11: Get rejected, try again
• Modify this for multiple inputs? NOPE.
Slide 91
Slide 91 text
Science for Grandma
How I Built
Step 12: Enter Botman
'
Slide 92
Slide 92 text
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();
Slide 93
Slide 93 text
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/
Slide 94
Slide 94 text
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?
Slide 95
Slide 95 text
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:
Slide 96
Slide 96 text
https://www.twilio.com/blog/2015/03/how-my-dog-sends-selfies.html
How I Taught My Dog
to Text Me Selfies
1
Slide 97
Slide 97 text
http://marcelpociot.de/blog/deploy-your-laravel-forge-sites-with-your-voice
Deploy Your Laravel Forge
Sites With Your Voice
2
Slide 98
Slide 98 text
Accept voicemails
3
Slide 99
Slide 99 text
Super-easy IOT!
4
Slide 100
Slide 100 text
No content
Slide 101
Slide 101 text
No content
Slide 102
Slide 102 text
IFTTT into
your app!
IFTTT OUT
of your app!
the possibilities
are endless!
Slide 103
Slide 103 text
What change can
I make today?
Slide 104
Slide 104 text
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.
Slide 105
Slide 105 text
Recognize the power
we have to change
other people’s lives.