824

September 20th, 2024 × #laravel#php#webdev

Taylor Otwell's opinions on PHP, React, Laravel and Lamborghini Memes

Taylor Otwell, creator of Laravel PHP framework, discusses the history and development of Laravel, building a sustainable business around open source, PHP community and ecosystem, thoughts on WordPress and more.

or
Topic 0 00:00

Transcript

Wes Bos

Welcome to Syntax. Today, we have one of our long wanted guests on the podcast. We've got Taylor Otwell. He's the creator, CEO, all around GOAT of everything, Laravel, the PHP. You probably know what it is, but PHP framework for building applications has, dare I say, a cult following, gaining crazy amazing community behind it, amazing momentum, been around for quite a while.

Topic 1 00:25

Taylor recently hosted 9th Laracon US with 950 attendees, up from 90 at the first one in 2013

Wes Bos

Excited to talk to you. Thanks so much for coming on, Taylor. Yeah. Thanks for having me. Good to be here. Yeah. So you're just coming off Laracon. Right? Just a couple days ago, you Yeah. You had it? Yeah. That's right. It was our, 9th Laracon

Guest 1

in the United States. We had it in Dallas down in the the Deep Ellum neighborhood in this cool, it's actually usually a concert venue, but we turned it into a tech conference venue. And, yeah, that's our that's our 9th Lair Con in the US. We've had other events in Europe, mainly in Amsterdam, Node in Portugal, a couple in Australia, and then 2 in India so far, and we'll have our 3rd this spring in India. Wow. So how big was the 1st Laracon? So the 1st Laracon was in 2013 in Washington, DC, and there was 90 people there. I actually didn't even think like, the 1st Laracom wasn't even my idea, actually. It was my boss's idea, Ian Lanceman from UserScape. And he was like, hey. I think you know, Laracom's kinda getting momentum. I think we could do an event around the framework. And I was like, like, I don't know if anyone will actually show up. I don't know if it has that many interested users. You know? But, yeah, we got 90 people. And this year, we were, like, 950 ish, 942,

Wes Bos

something like that. That's massive. So, yeah, it's turned into a pretty big event. Oh, that's that's amazing. I didn't even realize that. Ian was your boss at one point. When did you make the jump to doing Laravel full time?

Topic 2 01:45

Taylor created Laravel in late 2010 while working at a .net shop, then got hired by Ian in late 2011 to work on it full-time

Guest 1

So I created Laravel in my free time beginning in late 2010. Like, I was working at .net, sort of an enterprise environment. We had couple 100 programmers on staff probably.

Guest 1

Publicly traded company doing .net and COBOL.

Guest 1

And I started tinkering with PHP in my free time after work and eventually just created Laravel as, like, my own way to create web apps faster. And I put it out there. I wrote pretty decent docs for the Node point o Vercel, like, pretty thorough docs, which I think was really key to people actually adopting Laravel. Surprise, surprise. Yeah. So, anyway, Ian emails me at the very end of 2011. Laravel had been out probably, like, 5 or 6 months at this time, and he's like, hey. I saw Laravel. It looks really cool. We build help desk software in PHP.

Topic 3 02:32

Within weeks of launching first commercial product Laravel Forge in 2014, Taylor was making more money on it than his day job

Guest 1

We'd kinda like to modernize some stuff, and we're considering using Laravel. Like, would you be willing to come on board and work here? And, of course, I eventually said Wes, and, you know, I started working at UserScape. And the cool thing was he let me work on Laravel pretty much full time for, like, the first between, like, 4 6 months that I was there. I probably only worked on Laravel all day long. Wow. Basically, to add all of the features we needed. Like, we made the ORM a lot better. We wrote the queue job library during that time. A lot of the kind of foundational features of modern Laravel were built during that time period. Oh, that's awesome. For anyone listening, so this is a a fairly heavy JavaScript

Wes Bos

audience here. We do have quite a bit of Laravel listeners, but do you wanna give us a quick rundown of of what it is and, sort of the ecosystem around it? We call Laravel

Topic 4 03:21

Laravel is a full stack web framework for PHP focused on including batteries-included components for common needs

Guest 1

a full stack web framework for building applications.

Guest 1

And that means that you can think of it almost as, like, batteries included. So it's a web framework written in the PHP language, kinda like how Next would be a web framework written in JS. And it includes a lot of stuff out of the box, probably more than what people are used to if they're coming from a more JavaScript heavy background. So it includes things like user authentication stuff, like logging people in, all of that stuff, keeping that secure. It includes a database abstraction library just right out of the box. So, like, you wouldn't install, for example, Prisma, like, separately or whatever you wanted to use to direct with your database. That's just sort of included. We call that eloquent. It includes stuff all the way down to, like, working with file systems in a unified API. So, like, you use 1 set of methods like storage get, storage put, storage copy, and that works on a driver based system for, like, local file storage, for s three compatible storage, even for FTP.

Guest 1

Queue jobs, a lot of stuff out of the box. Right? Basically, everything we think you need to build most modern web applications.

Guest 1

And that's sort of, like, the goal is to sort of Sanity, like, for 80, 90% of web apps people are gonna build, Laravel has most of the stuff out of the box. If it doesn't, there's various community packages and, like, things people can install using PHP's package banner to add that functionality. Now what's kinda interesting is, like, on the front end, you have options. So probably the 2 most popular ways are to build front ends with a Laravel app or Laravel LiveWire, which is very inspired by Elixir's live view from the phoenix framework. Or a lot of people use this tool called Inertia JS, which lets you pair, like, a modern React or Vue TypeScript front end with a Laravel back end, but all in the same GitHub repo and using Laravel server side routing. So that's at inertiajs.com and livewire.larvel.com.

Scott Tolinski

Nice. All of the things that Laravel in includes are the things that you typically expect, like, a full framework to include. Right? But the JavaScript ecosystem, we've had such a hard time getting people to accept a tool like that. I'm curious about, like, the Eloquent and the the DB abstraction specifically.

Topic 5 05:14

The Laravel ORM Eloquent was inspired by Ruby on Rails ActiveRecord and the PHP ORM Paris

Scott Tolinski

Was that based on anything? And, like, did you build it from scratch? And, also, is the type of database you can use with that limited? Or, like, how many hard choices do you have to make there? So I would say Laravel,

Guest 1

as a whole, is very inspired by Ruby on Rails more than anything. It's very much, like, in that lineage of framework. So, like, Ruby on Rails, Django, even, like, .net MVC, which I was using at work at the time, it takes a lot of inspiration from those various places. And the database layer, which we call Eloquent, is definitely inspired by both active record from Ruby on Rails in the sense that it's like an active record style of ORM Wes you say, like, user first name equals this, user save, and it just saves to the database. In the PHP world, there was a little Scott very widely known ORM called Paris, and Eloquent was very inspired by that. I I don't think it's maintained anymore, and it honestly wasn't maintained even when I wrote Laravel back in 2011. It was already kind of out there, and whoever wrote it had sort of moved on, it seemed like, to other things. But it inspired Eloquent a Scott, actually. And still to this day, the underlying foundation of it is very similar. The supported databases, out of the box, Laravel supports SQLite, MySQL, Postgres, and SQL Server. You can use any of those things without really changing your active record or your eloquent syntax. And then people have written packages for, like, more kind of unique databases, like Mhmm. Really enterprise y stuff like d b two all the way to, like, you know, more niche databases.

Guest 1

And then for, like, document type databases like Mongo and other things, those are more like community maintained packages to to bring that support for those ESLint Laravel.

Wes Bos

So someone who has obviously been in a successful community like this, and you you look over at us in the JavaScript land, do you have any thoughts as to, like, why we don't have that in the JavaScript land? Like, quite honestly, we're we're jealous, and we've been saying for many years, like, we want Rails. We want Laravel in JavaScript.

Topic 6 07:30

Unsure why robust full-stack frameworks haven't taken off as much in JavaScript like Rails and Laravel

Guest 1

I don't know. Like, I mean, it seems like people have attempted it in various in various times and in various ways. Like, I've I've definitely seen JavaScript frameworks that tried to be, like, Ruby on Rails for JavaScript.

Guest 1

You know? Like, I don't know why that just doesn't really ever seem to gain critical mass to make it really, really popular.

Guest 1

I actually really like the current iteration of JavaScript frameworks, things like Next and Nuxt and Remix. I think those are cool. In, like, our world, we would call those a little bit more of, like, a micro framework, you might say, where it has this mechanism for, like, okay. Here's where you can put your code that runs on the server side, and it gives you a place to do that. But there's not a lot of, like, opinions and structure beyond that. You know what I mean? And if I was gonna build something, like, pretty a pretty robust staff like Laravel Cloud or Laravel Forge Wes there's a lot of moving parts in the back end, a lot of background jobs, a lot of kinda complicated things happening. I feel like if I was using something like the more popular JavaScript frameworks of today, I just wouldn't really know how I'm supposed to structure that or what I'm supposed to do because it's such a light touch, I feel like, on the server side compared to Laravel or Rails.

Scott Tolinski

Yeah. Totally. And I know I feel like there's there are people just they don't wanna commit to the ORM that everybody else is using. There's you know? I think people just really like their options and for better or for worse. And I totally agree about it being, like, a micro framework. I mean, oftentimes, people think, like, we have a framework, but that framework doesn't include auth or a connection to the database. It's like, okay. Yeah. How how much is that really doing for you? So when you were working on Laravel, well, part of it came first?

Guest 1

Kind of the routing library. The ability to say, hey. If the user hits this URL, run this function or this controller. That was sort of the first piece that I remember writing. And then I spent so much time on the database side just because it's the most complicated part, honestly, to get right, in my opinion, if you're building, like, a full stack web framework. And the 1st 80% feels, like, so fast and easy to build, I guess, like, in a lot of other projects. Right? And then that last 20%, it's just, like, agonizing. And I remember rewriting both the routing and the database layer of Laravel several times, like, when I was first building it, just to try to perfect it and get it right. Oh, that's great. Let's talk about, like, the business side of Laravel as well because, like, what I often find so cool is that

Topic 7 09:08

Taylor spent a lot of time on database and routing early on, rewriting both areas several times to refine and perfect

Wes Bos

you are able to obviously make this beautiful library that's open source, but you also are able to employ people, throw these wicked conferences, and also make things easier on on the people that are using it. Right? So you have a number of, like, products that you use for people who build Laravel applications?

Guest 1

Yeah. So to kinda give you the story on that, so I released Laravel in 2011. I don't make any money on Laravel any substantial money on Laravel until 2014 Wes I released my 1st commercial product at Laracon US 2014, and that was laravel forge, forge.laravel.com.

Topic 8 10:15

Commercial products like Forge, Envoyer, Spark, Nova and Vapor create sustainable business model around open-source Laravel

Guest 1

And, basically, it was a dashboard or it still is a dashboard to build servers on the cloud of your choice. It could be, like, Amazon, DigitalOcean, Hetzner, all these different server providers.

Guest 1

It installs PHP. It installs MySQL or Postgres. It gives you a dashboard for configuring, like, your scheduled task, your queue jobs, configuring your sites, your SSL certificates, all of that stuff, And people just pay monthly for it. And when it first launched, I think we had, like, a $10 plan and a $20 plan per month, and that was it. And, honestly, when I first launched Laravel Forge, I remember talking to my wife and being like, I hope we can just, like I hope it pays a few bills. You know what I mean? Like, if it pays, like, if it makes, like, $1,000 a month or whatever, that would be great. It would pay some bills and just give us some extra money.

Guest 1

But within, like, I wanna say, like, 4 to 6 weeks of launching Forge, I was making more on Laravel Forge than I was making at UserScape at my regular job. And I was so I was just, like, kinda blown away. And I was having to do customer support now because there's now you know, I've got, like, a real business on my hands. Yeah. So after that, I was just at UserScape for about, like, 6 more months after that launched and then went full time on Laravel on January 1, 2015 and then eventually went on to launch other products. So in 2015, I launched on Voyeur dot io. After that, yeah, I think it was twenty seventeen, I launched Laravel Spark, which was like a SaaS starter kit for doing, like, subscription billing on Laravel. Yeah. In 2018, we launched Laravel Nova, which JS our admin dashboard, and then 2019, Laravel Vapor, which is our serverless deployment platform.

Guest 1

All of those things were basically written by me except for Laravel Nova, which I coauthored with a guy named David Hempel. And then the latest, you know, commercial product we just announced will be Laravel Cloud, which we hope to have, you know, people in early access by the end of the year. And Laravel Cloud is really an evolution of everything we learned on Laravel Forge and Vapor about how to deploy and run Laravel apps.

Wes Bos

Wow. So that's that's like a whole cloud solution where you just you hook up your GitHub, you can get a database, and you you push a git commit, the whole thing builds and deploys?

Topic 9 12:30

New Laravel Cloud aims to provide easy Git deployments onto a fully managed hosting platform like Vercel for JavaScript

Guest 1

Exactly. And that's kinda what we have with Forge and Vapor. But the difference is with our current tools, you have to, like, link your own AWS account and your or your own DigitalOcean account or whatever. Yeah. So you're still really responsible for, like, those servers. You know what I mean? They're not fully managed, like, in the Vercel sense Wes your infrastructure is, like, totally managed by Vercel.

Guest 1

Laravel Cloud will bring that sort of, like, I Wes, you could say Vercel like experience to PHP

Wes Bos

and Laravel. That's awesome. And what's the stack for building that? Like, obviously, you probably built it in Laravel.

Guest 1

Yeah. So, I mean, a mix of things, and that's part of why we've hired a lot of people this year. So at the beginning of this year, it was just me and 9 other people, I think, 8 or 9 other people, mainly devs and Node customer support tech. Now we're a team of 34. Wow. So we've added a lot of people just this Yarn, mainly in engineering, I would say. So we have 3 full time infrastructure people. In Laravel Cloud, we've been building it's a Kubernetes based infrastructure on AWS that we manage. And then the front end, the app that people interact with, of course, is like a Laravel app with Inertia and React on the front end. So, yeah, we're using, obviously, a lot of our own tools on that side. But a lot of the Kubernetes work is way out of my wheelhouse and why we had to add finally dedicated infrastructure engineers to the team.

Topic 10 14:00

Inertia JS lets you pair a Laravel backend with React frontend, hydrating server-side rendered pages into an SPA UX

Wes Bos

And what parts, I'm curious, are inertia, and what parts are React?

Guest 1

So the way inertia works is, like, you write a controller, kinda like a rails controller, and then you return instead of returning, like, a PHP template, you return a React page, and the the array of data you give to the page is hydrated into the props of the React component. And from then on, it's like you're in React land. So you can use whatever you want. You can use frame or motion. You can use Shad c n. Like, whatever whatever you wanna use in React to build your React front end, you can use. It's really just the routing and data hydration that's a little bit different. So it's not client side routing. It's it's server side routing.

Guest 1

So the whole, like, dashboard and front end is written in React. But when you click, like, a link, for example, it hits the Laravel back end, which then returns the new React page you're supposed to be on. You know? And Inertia takes care of, like, managing the transitions between those 2 pages, the history state, all of that. So it's actually really slick. It lets you build React applications in a manner that feels reminiscent of building traditional, like, Rails apps or Laravel apps. It's kinda cool. And I think it's a good middle ground for people that are used to building apps in the traditional way and but they want to start using JavaScript on the front end to tap into all of the, like, awesome JavaScript libraries for building front end experiences. It's a good way to get into that ecosystem without going full on, like, SPA or with a separate API on the back end or something like that.

Wes Bos

Yeah. Yeah. And do do you see that as well? People just build a full GraphQL or API server in Laravel and then just Oh, yeah. Totally. Alright. We're going to the front end. Yeah. That's a big big use.

Topic 11 15:42

Very common architecture is Laravel API backend with Next/Nuxt/React front-end

Guest 1

Yeah. I don't know I don't have, like, data on how big it JS, but, like, anytime I'm at Laracon I talk to you all the time that have, like, either a Nuxt front end or a Next front end, and it calls just to an API that's running Laravel on the back end and returning either GraphQL or just JSON or or whatever they're doing. Do you have any information on how many people are using

Scott Tolinski

Laravel beyond, like, GitHub stars or downloads, or or is that the best way to track for you? I mean, we've tried to kinda get at this number

Guest 1

in various ways. We know that on the PHP package manager, Laravel framework, it's a quarter 1000000 installs a day. Crazy. Some of those are the same person. Right? So I would put the real number probably somewhere between 15 a 100000 people or something like that if I had to Wes. But it could be more. I don't I don't know. You know, like, right Node, Laravel Forge, we have about 600,000 sites being managed.

Topic 12 16:09

Estimate 15-100K Laravel installs per day, around 600K sites on Forge

Guest 1

Holy shit. We have tens of thousands.

Guest 1

So it's it's hard to say. Like, it's this is always a challenge for me. It's something that's always bugged me is I wish I had just more firm data on how many developers are actually using Laravel. It seems like such a basic stat that I've You gotta use that fancy word,

Wes Bos

tele what's the word? Telemetrics? The Telemetry. Telemetry.

Guest 1

Yeah.

Wes Bos

That's always the fancy word for That's always the fancy word for we're tracking how many people are using it. We're adding telemetry to the app. Oh, that's good. So I'm curious now. You went from 9 people to third 30 something people running this massive conference that everybody's jealous of, and your GitHub is solid green.

Wes Bos

How do you I don't know. Like, I think part of the success of Laravel is because, like, you are obviously coding every single day, and you're in there. You're you're making API design choices, but you're also, like, running a business. Do you have any, like, outlook on on that? How do you do that?

Guest 1

Yeah. So every day Wes I start my day up until today, literally this morning, first thing I do is always go to GitHub. So I have a a bookmark right at the top of my, you know, bookmark bar that takes me to a GitHub view that shows every PR across the whole Laravel organization.

Guest 1

I'm still the only person that really merges PRs on the open source side of Laravel. People merge PRs all the time on the the commercial products that don't necessarily go through me because they're maybe peer reviewed by, like, a team member or whatever. But when it comes to all of our open source libraries, and I think we have, like, over Deno, I still am the only person that clicks the merge button on any of those PRs. And I look at the code for every one of those PRs, which means that usually, like, every day, I have to end up reviewing, I would say, between, like, 15 and Wes PRs just so, like, if I wanna stay on top of it, you know, and not let it go crazy. And a lot of those are really fast. Right? Like a typo or Yeah. Or a one line change or whatever. And you you'll get a a couple maybe that are more substantial. But I actually see that as one of the most valuable things that I bring to Laravel still JS just ensuring a consistency of, like, taste across the framework and a cohesiveness of how the features all work together. Because a lot of times Wes people submit a PR to Laravel or one of the libraries, they only see it with, like, blinders on, you know, of, like, their particular need at this particular time. Whereas I have, you know, like, 13 years kinda 30,000 foot overview of, like, everything that's going on. And, oh, if we do this here, then it makes it inconsistent with how we do things over here, and that would be weird. So that's sort of what I bring to the table is, like, I kinda see myself I tell people I'm kind of like the wall on Game of Thrones. Yeah. You know, like, keeping protecting civilization from, like, madness.

Guest 1

That's basically what I serve as on GitHub. It's sort of a great filter.

Scott Tolinski

So when you do these code reviews,

Guest 1

do you have any, like, special tips or tools for getting through that many? I mean, that feels like a a lot. I don't have any tips other than just, like, doing it, sadly. I wish I did. Like I said, most are very quick. And, usually, I would say pnpm any given week, I might have 3 or 4 that are, like, a little bit more substantial for the entire week. And by substantial, I mean, it might take me 20 minutes or something to to review it. It's very rare that I would get something that requires a lot more than that. Yeah. Do you have, like, automated, like, code style and everything like that that is is strictly enforced? Yeah. Yeah. We have a pretty big test suite of of thousands of tasks. We have code style automated.

Guest 1

Usually, what I'm looking at is stuff that can't really be captured by code style linters, like, almost like things that would be just like preference or how I would write the code if I was gonna write it. And the other thing is just that consistency element of, does this align with how we do things in all other parts of the framework, and does it make sense with the rest of the ecosystem? Or does it feel too niche? You know, a lot of people submit PRs that are just, like, way too niche for their Mhmm. It's like their specific thing that no one else is ever gonna encounter, and it doesn't make sense for us to merge this in and maintain it forever. Because that's another big thing is I always have to assume that once I click the merge button, like, it's fully my Node. You know? And even though people may say, like, hey. Yeah. I'm happy to help out. No fault of their own. Like, you never know. Like, 6 months from now, they are at a different company, and now they write Rust for a living. And they have no interest in, like, coming back to fix this thing that they only added because they needed it at their job Wes they were writing PHP 6 months ago. And it's just so I have to assume, like, we have to maintain it forever. Scott and I call that the, now I'm responsible for this water bottle, which is the

Wes Bos

kind of last tweet. Yeah.

Wes Bos

Now I'm responsible for this water bottle.

Scott Tolinski

Yeah. Seriously.

Wes Bos

I relate to that tweet a lot. Yeah. Yeah. You're in charge. So I'm curious about your productivity mindset or, like, if you have any any tricks or anything there because of, like I'll tell I'll give the audience an example. I spoke at Laracon 2018.

Wes Bos

When was Nova released?

Guest 1

Yeah. 2018 in Chicago.

Wes Bos

2018 in Chicago. And Taylor just emails me. He's like, hey. You you wanna speak? Sure. Alright. Book your flight. How much was it? PayPal's you immediately. You know? There's no send an invoice and all this Bos stuff around it. It's just like bam, bam, bam. It's all just just done. I was like, man, this guy is operating on another Vercel, and I'm curious what that is. Is it just do it? It's funny you mentioned that. Other people have said that kinda thing to me before. Like, I I operated the business in this very low touch way, I Wes, you could say, where even for our employees,

Guest 1

I would give them, like, a high level picture of what I think we needed to do for that given month. And that's usually how it would work is kind of, like, monthly cycles. And I would write, like, 1 paragraph for, like, hey. I think we should add this to Laravel Forge, and I think this person should do it. And they would just go do it. And if they have any questions, like, they're free to ping me or whatever, but we didn't like, I never did calls. I never did meetings.

Guest 1

It was, like, very low touch. Like, there was employees I didn't talk to on the phone for, like, years or more. You know what I mean? It was just it was just crazy. Things are a little bit different now. Actually, we actually do have a couple weekly standing meetings on, like, Laravel Cloud and another product we're working on as well. But, yeah, I was just always Scott, like, no Bos, very low touch, not into, like, wasting time with a bunch of ceremony. That's just sorta how I always ran the business. Has that ever burned you? I mean, it's hard to say, like, hard to say what we could have got done if we would have had calls. You know, maybe we would have been even more productive. Like, I I don't know. It hasn't really burned me in, like, a super bad way that I can remember. Like, even this year at Laracon, we had you Node, like, the whole basketball game, the terminal guys came and brought their coffee and stuff. And even that was so low touch. I remember Dax was like, wow. This was, like, the easiest business transaction I've ever Node. Because it was like, hey. Yeah. We'll do the coffee. It's this much probably. I was like, in Slack. Great. Sounds good. Let's do it the end. You know?

Topic 13 23:18

Ran Laravel with almost no meetings just setting high-level goals, very low-touch trust in people to get it done

Wes Bos

Nice. Yeah. Just just let her rip. I love that approach to things. And, obviously, there are like, my wife hates that about me, that I'm just like, I don't know. We'll just do it. And she's like, no. We need to sit here and plan Yeah. And then think about things that could go wrong and and account for that. And it's just like, just let her rip. That's my personality, and, obviously, there's there's downsides to that type of thing, but I think you come up with some really neat things.

Guest 1

When building products, I would say like, a tip I have in that regard is if I was gonna do something like build Laravel Vapor, one thing I always try to do is build the hardest thing first, like, the scariest part first. Mhmm. Since I wasn't doing a lot of, like, formal planning like that, I just had an idea of the product I wanted to build. If there was a particular feature that scared me, you know, that one feature where, like, yeah, I'm not sure, like, I'm not sure if that's even doable or that's even achievable, I wouldn't waste a lot of time, like, building all these, like, simple screens first. I would just do that hardest thing immediately. You know? Because if I'm gonna fail, I would rather fail, like, this week rather than 3 months from now after I've burned a lot of time doing the easy stuff.

Guest 1

So that's how I always approached building products personally. I love that mentality.

Scott Tolinski

Yeah. I I always found, for me personally too, if it scares me, there's probably a reason that it would be good for me to have that exposure to that. Right? It's like, here's a big gap in something I I don't understand.

Topic 14 24:27

When building products always build scary risky parts first, fail fast if needed

Scott Tolinski

And you're better off filling those gaps, sooner rather than later. Right? Yeah. And if you want to see all of the errors in your application, you'll want to check out Sentry at sentry.ioforward/ syntax.

Scott Tolinski

You don't want a production application out there that, well, you have no visibility into in case something is blowing up, and you might not even know it. So head on over to sentry.ioforward/ syntax. Again, we've been using this tool for a long time, and it totally rules. Alright.

Scott Tolinski

You know, one thing I think that Laravel is often praised for is just the the general ease of use and design. And I know you you said a lot of that just comes from, like, the product that you want to build. But do you have any, like, rules or outlooks on what makes, like, a a beautiful API or an API that people want to interact with?

Guest 1

I would spend a lot of time Wes I was building new features for Laravel just sort of in a basically blank editor with 1 route on the screen and just typing in sort of pseudo code of what I wanted, how I wanted the feature to work. And there was no code really behind the scenes. I was just typing, what if it looked like this, or what if it looked like that? Does that look good? Does that feel good? A lot of the major things I did were written in that way. Wes I I used to have a word for that. It was like I I don't know. But it was just maybe like, if I could just write the ideal code, what would that be from the API perspective? I always try to keep a lot of the method names really short, memorable, sort of expressive, and like a prosy kind of, I think that's very Rails inspired personally, like a very plain English kind of way of Mhmm. Writing the APIs.

Topic 15 26:15

Spent lots of time pseudo-coding the ideal APIs in a scratch pad first

Guest 1

I had only a few, like I I would try to never, like, make users pass a Boolean flag to a method, for example. Keep all the methods really clean and short. I don't know. There Wes just a few simple rules that I think kinda paid off. But I think starting with writing the actual API that I wanted to use was a a big piece of that. And it sounds obvious, but, surprisingly, I feel like a lot of people don't do that. I feel like they don't. Yeah. They start sort of start they just start implementing things, you know, and they haven't really thought about how is this actually gonna how do we want the user to use this?

Scott Tolinski

Yeah. It shows. I think, a lot of projects could use that attitude of how does it feel to use this? Because a lot of people are really focused on the Sanity, but not about the the the touch.

Wes Bos

The comments in Laravel I I think every single comment in Laravel is 3 or 4 lines, every line being 3 characters less.

Wes Bos

What the hell?

Guest 1

Yeah. That's gotten a lot of attention over the years, and it's not automated. Like, everyone is sort of hand done that way. I've just gotten really fast at doing it. It just like, I committed to the bit at some point, and then it just, like I just kept going with it. And now, of course, like, it's way too late to to stop. I think it started at first with the skeleton config file. So the config files that the user sees in the config directory of the framework, there's, like, a database config file, a file system config file, blah blah blah. Mhmm. Each option has a comment that sort of explains what it does.

Guest 1

And I think when I first started doing those, before I started formatting the comments that way, I was just really unhappy when I would open the config files and scroll.

Guest 1

It just didn't have this sort of, like, nice aesthetic appeal to it, like, visually.

Guest 1

And so I remember I had 1 comment that was, like, you know, 3 lines, 3 characters, Wes or this nice, like, slope too as it, like, sloped in. And I was like, oh, that looks kinda nice. Like, if every comment looked like that, that would be pretty sick in the config files.

Topic 16 27:59

Started doing the 3-line comments just for visual appeal, became an iconic part of Laravel over time

Guest 1

And then I just kept rolling with it, and it became like a a Laravel meme of sorts.

Scott Tolinski

It's inviting.

Scott Tolinski

Yeah. I get it. It's so

Wes Bos

funny that you do that. It's

Guest 1

I think it's even more impressive that you can can do that. I've seen people try to get AI to do that recently, and it's it's hard. Like, I haven't seen anyone actually be able to get it to do it consistently

Wes Bos

so that it works. Getting AI to output something of a exact length is very hard because of how the organization works.

Wes Bos

So it's it's one of those last things that, well, the Bos will never do as May maybe that's the test for AGI. You know? Yeah. Yeah. Yeah. Alright. And and comments in general. Like, a lot of people say, oh, if you have to write comments, your code is too complex.

Wes Bos

Obviously, you're probably not in that camp.

Guest 1

Yeah.

Guest 1

I'm a weirdo. So, like, I'll add comments for purely visual purposes. If I feel like, this method's kinda going along and it's a little unclear what's happening, I think a comment would look good here. I'll add 1 there. But, yeah, I mean, a lot of the comments in Laravel, some of them are more useful than others. You know? Some stuff is genuinely complicated and I think needs a comment, especially in an open source framework where there's a lot of other people looking at the code, you know, besides Vercel, it can be useful to have some decent comments in there. I definitely think you can over comment code to where it's just sort of useless.

Wes Bos

Mhmm. What are your thoughts on typing PHP?

Guest 1

I like it. I mean, PHP has changed a lot even since I first wrote Laravel in 2011, and a lot of stuff a lot of the changes have been in that area. So when I first wrote Laravel, like, you couldn't even type in a string in PHP. There was not, like, a primitive string type ESLint. You could type in objects and classes Mhmm. But not every primitive even had a typeint. There was no return types. There was no union types.

Topic 17 30:02

Modern PHP has grown significantly in last decade - types, speed, features

Guest 1

So there was just a lot of type features missing when I first wrote Laravel. And so we've been trying to, like, add them as we go over the years as they're introduced and as we can without, like, breaking things. But now I think probably the vast majority of Laravel and PHP developers use types as much as they can. Mhmm. And Wes have tools like a PHP stand, which is like a static analysis tool for PHP that analyzes your code and shows you any type problems. And most of the stuff is built into, like, PHP IDEs, like, PHP Storm and even Versus Code and stuff these days. So I think that's that's probably how most people write PHP these days JS is kind of as a strongly typed language as much as they can. That's good. Is there any features of PHP that you you wish would be added or or maybe anything that has been added recently that you love? Oh, gosh. I mean, I think the big one that always comes up if you talk to PHP developers, and it's around types, is the ability for, generics in PHP. So you cannot say that you have yeah. I mean, you can't even say that you have, like, an array of users. You have to use PHP doc, which I guess is kinda like JSDoc where Yep. The type info is actually in basically a comment, but the static analysis tools can read it. That supports generics and all of that stuff, but it's not actually built ESLint the PHP language typing system directly at this time. So that always comes up as a big one. I always think, like, just make it anytime you can make the language faster, that's, like, a great improvement. So PHP seven, like, doubled the speed of PHP from the old era to sort of, like, the new modern era of PHP. That was a pretty big jump.

Guest 1

But, overall, I would say PHP is a feels kinda feature complete to me. I mean, I'm sure there's things they could do, but I don't find myself every day thinking, oh, I wish I had this feature. I wish I had that feature. Yeah. Those things feel feel pretty solid. And

Wes Bos

runtime, you ever Wes with any of the, like, Facebook what is it? Hip hop VM, the PHP runtime? Yeah.

Guest 1

I think it was originally launched as hip hop, and now maybe it's called hack hackling or something. So that is what inspired PHP seven. So Facebook came up with hip hop VM, which made PHP much, much faster for their use case, which Scott lit a fire under the PHP internal team Interesting. Which resulted in PHP seven, which introduced something called the PHP opcache, which is sort of a technical thing. But it it caches the, like, opcode of the p compiled PHP in memory Sanity doesn't have to sort of interpret the PHP scripts on every request. That sort of was their response to hip hop Npm. And I've never seen one of those, like, alternative PHPs, like, really take off. You know? It just hasn't been something that has traditionally gained a lot of ground for whatever reason. I think probably just because most of us simply don't need that level of speed, you know, like, Pnpm.

Guest 1

If you have a couple PHP servers behind a web balancer, you can serve millions and millions and millions of requests per day. So most of us Yarn Scott at Facebook scale and have never really needed that.

Scott Tolinski

Yeah. It's wild the the amount of people that feel like they have to be at Facebook scale from the from the jump rate. Crazy. Yeah. Yeah. What's something that people get wrong about modern PHP?

Guest 1

Gosh. I don't know. I mean, I think there still is somewhat of a idea that most PHP is like spaghetti code or just really nasty and hard to maintain.

Guest 1

Like, you've got SQL queries mixed into HTML, and, like, it's just a mess of stuff everywhere. I'm sure there's still a lot of legacy PHP out there that's written in that way.

Topic 18 33:30

Most PHP today much more organized than legacy reputation but old stigma still persists

Guest 1

Mhmm. But, you know, I think most of the PHP written in the last 5 to 7 to 10 years maybe is much more probably maintainable and and organized than what people remember if they haven't written PHP in, say, 10 or 15 years and they moved on to other ecosystems. It looks a lot different. It may not even really look how they remember at all.

Guest 1

But it's hard to kind of lose that stigma of being sort of just like a very messy, error prone, bug prone language.

Guest 1

Yeah. Doesn't help, Peter Levels going on Lexus Friedman and running his mouth about single file apps and stuff like that. Yeah. I mean, he, like I would say he writes PHP in the old school way still to this day, you know, where it's, like, index Scott PHP file, and Yeah. You're doing SQL queries at the top of the file. Like, that's, like, that's probably how their people remember PHP, honestly.

Wes Bos

That's funny. What about, like, servers? So, like, I'm thinking back to my my WordPress days. You know? The LAMP stack is is what everyone it's just still the best acronym for a stack. Are you using NGINX or Apache still? What what do most people use?

Guest 1

I think most people are using NGINX, or they're using even something newer like Caddy. So Forge if you provision a server on Forge, we use NGINX.

Guest 1

Laravel cloud eventually boils down to NGINX under the hood. There's some new PHP application servers. One is called Franken PHP, which is built on top of Caddy and lets you run your Laravel app without NGINX or Apache at all. You know, it just sort of uses Caddy under the hood. I think we'll probably use that a little bit in Laravel cloud as well. It's pretty dang fast. It has some cool stuff where, you know, a lot of times, if people need a little bit of extra performance out of their PHP app these days, instead of jumping to something like Hack or Hip Hop VM, there's actually been ways developed to boot the PHP app and sort of keep it in memory and feed it requests as they come in so we're not having to rebuild the world on every request, which is traditionally how PHP has worked in the past.

Guest 1

And that gives you, like, at least double the performance and sometimes triple or quadruple the performance because most of what makes PHP apps slower is that we have to reboot the entire framework and read every file, like starting at index PHP from scratch on every request. And that has benefits because, like, you don't leak state between requests. You don't leak memory between requests because you're not really keeping the app up and in memory. But newer tools like Franken PHP allow you to actually keep the app booted up and just feed it Wes really quickly, which is kinda cool as well. Oh, that's cool. I remember that being my as someone who initially learned how to program in PHP, you know, and I learned Code Igniter. And then when I moved to to JavaScript, I was just like, I just wanna go to the file and for it to run. You know? I wanna go to the whatever pnpm

Topic 19 35:31

New PHP application servers like FrankenPHP allow keeping apps booted to increase speed

Wes Bos

or, like, I made a change. I have to go and reboot the Vercel. And at the time, there wasn't these, like, tools that would restart. It say control c and and restart. I'm like, PHP was just, like, stateless. Wes just you visit the website, and the whole thing runs. And that was beautiful. Did you have a favorite CMS

Scott Tolinski

in the past?

Guest 1

So this is funny, but I've never used a CMS. Nice.

Guest 1

This always blows other PHP developers' mind when they're like, oh, what? Have you ever built a CSS, or would Laravel ever build a CMS as a company, you know, as, like, a paid thing? And I just sort of missed that. You know? When I graduated from college, I immediately started writing enterprise .net, like, custom Windows desktop applications and stuff. And then I jumped into Laravel, and I just never had a CMS error, you know, like, in my career. So I always tell people, like, I would wouldn't have the 1st idea how to build a CMS, what CMS users would find important, any of that stuff. Wow.

Guest 1

But there are some cool CMSs in the Laravel world. So, like, Statimic comes to mind as Oh. Sort of a kind of a kind of fun CMS in the Laravel world. Has Statimic always been Laravel based? As far as I know, yeah. I think so. I've used this before. Yeah. Have you ever this is might be a crazy question, but have you ever written any WordPress, or do you have any thoughts on that whole ecosystem? I've never written any WordPress, like, a custom plugin or anything. I have used a WordPress system, like, for helping, like, a family member set up a blog or something. Yeah. Mhmm.

Guest 1

What WordPress was able to achieve on PHP is kinda crazy and and cool.

Topic 20 37:54

What WordPress achieved on PHP is impressive - updates, plugins, marketplaces

Guest 1

This kind of self updating installable plug in marketplace thing all written in Pnpm. Like, that's it's a pretty impressive piece of software, I guess, for better or worse. But I don't have any experience actually doing WordPress development, and most of the stories I hear from that don't usually tend to be positive, I would say.

Wes Bos

Oh, that's good. I wanna know how you feel about the Lambo memes. So for for the audience listening, Taylor has a orange Lamborghini.

Wes Bos

Many times, there's been many jokes

Guest 1

on Twitter about, like, man, I'm writing the wrong language. And, like, honestly, like, PHP owes Taylor a lot for, I think, making PHP cool. I've had my fair share of Lambo memes. I'm curious how you feel about those types of things. You're not a very flashy guy. I think it's pretty funny. I mean, like, I've had people tell me, Aaron Francis was actually telling me recently, he feels like that that car has done more for marketing PHP than, like, basically anything in the last 20 years. Yeah. And it wasn't intentional at all. It just sort of became that way. But, no, it's funny. Like, I don't know. I think it's cool. It's, like, very, yeah, not what I expected, but I enjoy it. It JS a funny time. This year at Laracon, we gave away a Lamborghini LEGO set to sort of, go along with that meme.

Topic 21 39:11

Got Lambo license plate "Facade" as reminder it's just a possession, not that important

Guest 1

The terminal guys rented a Lambo. That wasn't yours, was it? Yeah. That wasn't mine. That actually looks a lot like mine. Almost the exact same, except it was a convertible and mine is not. But other than that, it was, like, basically the same car. Yeah. So they rented that at Laracon, made a bunch of funny bits with it. So, yeah, good stuff. Oh, that's good. Do you do you ever get kids asking what do you do at, like, a gas station? Yeah. That's actually the people that come up to me the most. So, like, if I go to a gas station I live in a really small town, actually, in Arkansas, where you would never see, like, a car like that around here. So it's, like, obviously very unique. But anytime I take it to get ice cream or the gas station, the kids, like, freak out. And that's honestly, like, the funnest part of even having the car is, like, I remember when I was a kid, if I would have seen, you know, an exotic car in my town, that would have, like, made my entire year, basically, of being able to see like that. So I think that's actually the most rewarding part is just, like, taking it out, and some kid gets to take a picture with it or, like, I'll let him sit in the car for a bit.

Guest 1

And it's just, like, they are so, like, just, like, so happy just to, like, get to hang out and and see it. And yeah. But people do usually ask what I do, and I just tell them, like, I started this kind of web tech company where we help people, you know, build websites faster.

Guest 1

And, that's about as far as I go into it. Yeah.

Wes Bos

That's good. And you have a custom plate for it. Right? Yeah. Facade.

Guest 1

So, yeah, facades are a feature in Laravel that Wes I first released them were not well received at all, and I thought they were really cool. So it's basically a way to access services in the Laravel dependency injection container in this very easy way. That sounds like very basically what keeps Laravel syntax very short and easy and not verbose and cumbersome to use. Yeah. It was a very controversial feature at the time in Laravel, but now I think pretty widely accepted and adopted and used and stuff. So when I got the plate, it was kind of like a dunk on, all the all the facade haters back in 2015, 2016 that gave me such a hard time about the facade. So just had to put it on the plate. It had a deeper meaning as Wes, so don't know. This is gonna sound hopefully, this doesn't sound too corny. No. I I was I was trying to get that out of you, so I'd like to hear it. I wrestled with getting this car. Like, I talked with Adam Wavin from Tailwind about getting this car for probably, like, 5 or 6 years before it happened. I was like Yeah. For those who don't know, me and Adam are basically he's, like, kinda like my best real life friend, I Wes, you would say, but also tech friend. And we talk pretty much every day about tech and about other stuff, and and we play games together like Fortnite and Rocket League and stuff. And so every summer, every year, I would mention that. I'm like, I kinda wanna get a Lambo. Like, it's always been my dream car since I was a kid, you know. And I was like, maybe if revenue is this number or I have this much in savings next year, I'll get it. You know? Or, like, when I can buy it and have this much left in cash and savings, I'll get it. And so I already set all these financial milestones for when I might be able to get this car. Right? And every year, I would kick the can down the road. I would hit the milestone, but then I'll be like, just like I don't know. Like, maybe when I'm this or maybe when I'm that. Yeah. So, eventually, the car pops up on the website a couple summers ago in Lamborghini Dallas. And I called them, and I'm like, hey. I'm kinda interested in the orange Huracan that just came up on the website. At that time, it was very hard to find any sort of, like, vibrant color Lambo. Mhmm.

Guest 1

Cars in general JS, like, post COVID era where cars in general were, like, very hard to find. And so the guy's like, yep. We sold it to the original owner. It's only got a couple 1000 miles on it. If you want it, we can have it to you by this weekend.

Guest 1

And the way he, like, put me on the spot about the weekend thing, I was, like, almost too embarrassed to back out at that point. So I was just like, okay. Like, yeah. Sure. Because I didn't wanna be like, oh, no. Never mind. You know what I'm saying? Yeah. Yeah. I'm still I'm still I would because I would feel so stupid. Then it just, like, it all happened so fast, and next thing you know, there's, like, a Lambo at my house, within a period of a few days. But I guess I got the facade plate as kind of like a reminder of the fact that it's just a car. You know what I mean? Like, it's got nuts and bolts, and it will rust. And the cool exterior is really, like, a facade for this very, like, temporary possession that will eventually break down and be in a junkyard somewhere. You know what I mean? So it Wes almost just like this constant reminder of, like, hey. This is cool, but it's, like, not that important and not that big of a deal, which I feel stupid saying it because easy for you to say. You're the one with the Lambo. You know what I mean? Yeah. But, like, it it was still just, like, supposed to be a personal reminder of the important things in life, which are not Lambos. You know? No. That's great. Yeah. Can we ask you about your your coding setup? I know you have a beautiful office.

Wes Bos

What do you sit down in front, and what editor are you using?

Guest 1

Yeah. Oh, man. So so, like, kinda my whole setup would be MacBook Pro 16 inch. I've got the Apple XDR display, probably major overkill in hindsight. I have, other than that, just, like, standard Apple keyboard, standard Apple trackpad. People always ask me, like, do you have, like, some mechanical keyboard or whatever? But I've said pretty much, like, standard stuff. I'm still using Sublime Text until the day I die pretty much. Wow.

Topic 22 43:52

Still uses Sublime Text, maybe will try VS Code more actively once Laravel extension launches

Guest 1

So I still use Sublime Text a lot. I like Versus Code. We actually are releasing our own first party Laravel Versus Code extension to really make that Laravel experience really good in Versus Code. So maybe once that comes out this fall, I'll I'll try to make the jump over to Versus Code because it seems like that's what a lot of people are using these days. What's keeping you on Sublime? What do you like about Sublime? You just know it? I just know it. It's super fast. It's just such a fast feeling editor. Versus Code feels actually pretty fast too, I would Sanity. But I think I just know it. Last time I set up Versus Code and really configured it to how I liked it, it actually was very, very close to, like, my experience in Sublime in terms of speed and key mappings and everything.

Guest 1

But I just always kinda just end up finding myself back in Sublime for one reason or another. So we'll see. If Sublime disappeared tomorrow, I'd be perfectly happy using Versus Code. That'd be totally fine. Yeah. And you don't use any, like, GitHub Copilot or anything like that, do you? Not really. I have used AI occasionally for code, like, for regular expressions, for figuring out how to do something in a tool I'm not super familiar with or a language I'm not super familiar with. Like, if I needed to write something really simple in Go, for example, I would probably just ask AI for help. I've used it in those kinds of situations, but, no, it's not really I don't use it in my editor.

Scott Tolinski

That's cool. Yeah. Regex.

Scott Tolinski

Definitely a good use case for that, for sure. Yeah.

Wes Bos

Alright. Let's get in the last section of the show here, where we go over 2 things. 1st 1 is a sick pick, and the second 1 is a shameless plug.

Wes Bos

Did you come with any either of those?

Guest 1

I do have a couple sick pick candidates.

Guest 1

One of the coolest things I've seen recently it's a game called tiny Glade.

Guest 1

Have you all seen this? No.

Guest 1

Okay. Y'all gotta y'all gotta check this out. I think it's built by 1 person. The beta is out on Steam right now. It's this super chill there's not really any objective, but you, like, drag and click and drop to build these little kinda like whimsical castles or, like, medieval looking buildings, and it's got this, like, very peaceful vibe. There's no, like, money or resources or anything.

Guest 1

But just the animations and the way everything snaps together and how smooth it all is is just, like, super impressive to me from, I think, actually a first time game developer building this game.

Guest 1

Yeah. So that is something I found really impressive lately and would be my sick pick.

Scott Tolinski

I follow this dev on Twitter. They're a great follow. I didn't know the game, but it is funny looking at the way these things all snap and adjust. It's, like, kind of responsive web design on on steroids in three d context. It's crazy. Yeah.

Wes Bos

Yeah. I found it really impressive. Yeah. I could see my kids loving this. My kids are super into Minecraft right now, and they love building their own

Guest 1

this is cool. And what what else did we ask for? Are we on the are we going to plug a section, or are we do we still have more picks? Well, you can have as many picks as you'd like. Yeah. Many sip picks as you want. We, our record, I think, is about 6.

Guest 1

Well, that's the main one. Other than that, I've always been a big No Man's Sky fan staying on the game's team mainly because I mean, I like the game, but, also, I find the story behind the development of the game really kind of inspiring. People may remember if they follow this game that when it launched, I don't even know how many years ago, it's been several, it had just a terrible reception.

Guest 1

And before it launched, it was very hyped. It was kind of this open world space sandbox with literally, like, 1,000,000,000 and trillions of procedurally generated planets. And so, obviously, everyone was very excited before launch. The trailers looked awesome.

Guest 1

And it comes out, and it just it, like, gets trashed. It doesn't have the scope that we thought from the trailer. It's buggy. It's boring. And instead of, like, throwing up their hands and giving up on it and just sort of like, okay, whatever, riding off into the sunset to the next project, They've basically released, like, I don't even know, like, maybe 15 expansions to this game for free to the point where now it's, like, mostly positively reviewed on Steam and, I think, a really well liked game. But I just find it very inspiring as a story of, like, sticking with what you're working on and grinding it out, you know, to, like, make something really awesome even though it wasn't really well received at the time. And I really relate to that for Laravel because, you know, I've been grinding on it for, like, 13 years at this point, which is a long time in, like, web development timelines. Yeah. Yeah. But just sticking to it every day and and grinding on it every day bit by bit, I think, has just will just pay off in the long run. So that that'd be a 2nd sick pick. Yeah. That that whole thing I mean, I followed that from the start could considering I was, like, super interested when the

Scott Tolinski

trailers came out. And as somebody who likes meditative type of games, I always on on the Reddit's defending that game on launch just because I was like, it's supposed to be meditative.

Scott Tolinski

It's like it's boring. Yeah. Yeah. That's how definitely,

Guest 1

definitely inspiring story for sure. Do you have any, shameless plugs, or you wanna keep going on sick pics? Those are my 2 sick pics. So Sick. My shameless plug I mean, the most recent thing in Laravel world would be Laravel cloud, cloud.laravel.com.

Guest 1

We're basically building the easiest way to ship and scale and deploy PHP and Laravel applications because I think Laravel has always been a framework that's just about getting things done and and shipping web apps with kinda no BS and no red tape. So we're trying to build a cloud platform that really captures that as well. We felt like Laravel developers we have a really great ecosystem for building web apps, but we have a little bit of catching up to do as far as, like, shipping and scaling them really easily, especially with how, you know, the great work people like Vercel or or Netlify have done in terms of how easy they've made it to deploy JavaScript based applications primarily. And we wanna do that for Laravel. So you can get on the waiting list for that at cloud.larvel.com.

Guest 1

Like I said earlier, we hope to have kinda, like, beta testing early access type of users in there later this year. And, yeah. So that's that's the main thing we've been working on here at Laravel for the past 6 months. Alright on. Well, thank you so much for for coming on and imparting all your wisdom on this. This was you've been on our, goat list for a while. We have this list inside of,

Wes Bos

our Notion, which is the goat list, and you've been on that list for a while. So really stoked to finally get you on, and this Wes really fun.

Guest 1

Oh, Wes, I'm honored to be on the goat list. Thanks for having me.

Wes Bos

Cool. Alright. Thanks again, Taylor.

Share