When should you pick Laravel over WordPress?
## [00:00:00] Introduction
[00:00:00] **Brian Coords:** You are listening to viewSource, conversations around WordPress and adjacent tech with hosts, Aurooba Ahmed and me, Brian Coords.
[00:00:08] **Aurooba Ahmed:** First episode of season two. Are you excited, Brian?
[00:00:11] **Brian Coords:** I've missed viewSource. I'm ready for more viewSource. And the, the, the crowds are clamoring for it. So
[00:00:20] **Aurooba Ahmed:** Well then let's just dive in, shall we? Uh, let's kick off with talking about something that is a lot like WordPress, but is not WordPress, and I'm really excited to sort of have this slightly different discussion than we're used to with you today.
[00:00:35] **Brian Coords:** yeah, I think it's one of those things that you say, like, Oh, get time out of WordPress, learn other things, uh, because it'll just. Get you more well rounded. You'll learn other stuff like it'll make you think of things differently, but sometimes it's hard to get the time For whatever reason I've had a lot of time in non WordPress stuff So I'm I'm ready to talk about it and do a few episodes about it
## [00:00:58] Getting into Laravel
[00:00:58] **Aurooba Ahmed:** Yeah. So, I mean, let's just not keep everyone in a mystery or a shroud. We're going to talk about Laravel, which is like this other really amazing, thriving community based on top of PHP, just like WordPress. And, uh, yeah. Do you want to tell us a little bit about it?
[00:01:16] **Brian Coords:** I would say that to me is almost where the comparison ends. Like they both use PHP. That is true. Um, but it's, it's almost something completely different. Like, did you ever go through a phase? And I think a lot of us went through this where no matter what the idea or application was, you were like, I could build that on WordPress and you would build things on WordPress that should never have been built on WordPress.
[00:01:41] **Aurooba Ahmed:** definitely. I have definitely done projects that now when I look back, I'm like, you know what? That was dumb. WordPress was not the right fit and I spent too much time fighting WordPress rather than like working on the actual thing just to make that thing happen on WordPress.
[00:01:58] **Brian Coords:** Exactly. So like. When, if you're doing something and you're like, I really don't need custom post types. I need completely different ways to just store my data and stuff. And, uh, I don't really need a block editor. I need something completely different. When you get into those places and you're trying to do relationships between things and heavy processing and stuff like that, um.
[00:02:20] Laravel is just, it's, it's a completely different like approach to building stuff and you could build a WordPress with a Laravel, but you could build pretty much anything, anything application, you know, based and it's, it's, um, it's very popular for a reason. Have you messed with it at all?
[00:02:37] **Aurooba Ahmed:** I've messed with it to the extent of I've installed and spun up like their basic scaffold on my, on my computer, but I've been wanting to dive into it a little bit more, because I've been seeing you go into it for the last little bit, but I've also been holding back, because I want to have this conversation from that perspective of not having explored it as much, with you having explored quite a bit of it more than me, you know?
[00:03:06] Because I think that's an interesting, that's an interesting, that's a more interesting conversation that a lot more people will relate to.
## [00:03:12] How Laravel is Different from WordPress
[00:03:12] **Brian Coords:** Yeah. And I would say that I'm not. I would never say I'm an expert really in anything, like I'm much more of like a generalist overall, um, but I've gotten to a place with some projects where there were certain things that I needed, like I want to not just do an action, I want to queue up, I want to make a bunch of requests, put them in like a Queue and then let the server process them in order and stuff.
[00:03:39] Um, WordPress, not that great for that. Laravel has it built in. I want to set up notifications to an SMS provider, to an email provider, uh, browser notifications, you know, WordPress, you can do those things. Laravel has a package ready for you. So like there's all these sorts of fun things that you can do, like right out of the box with it that I've been exploring and stuff.
[00:04:02] Um. So I'm, I'm super excited to kind of dig in and show you like, you know, uh, what we're going to do. So should we talk about what we're going to do?
[00:04:11] **Aurooba Ahmed:** Yeah, so I guess to step back for one second, what we're thinking of doing is doing sort of a short series of episodes where we dive into this topic of Laravel, um, a little bit more deeply and because, you know, we're developers and we like doing projects, it's going to be project based.
[00:04:28] So you are sort of building a fun little project with Laravel and we're going to use that as sort of the basis for our conversation for the next few episodes, right?
## [00:04:38] Introducing the viewSource Laravel mini project
[00:04:38] **Brian Coords:** Yeah. So I'm going to show an example of what we're trying to build, um, on the screen and we can talk about how we would do it, how we're going to do it. Um,
[00:04:50] **Aurooba Ahmed:** Totally.
[00:04:51] **Brian Coords:** And I'm thinking that this is going to take about four episodes to kind of go from beginning to end. We're not going to code the entire thing. We're going to do pieces and then talk about more of the foundations, fundamentals behind it. Um, and that's going to be our approach, but this is a good screenshot of what we're trying, what we're going to build, um, a little interface.
[00:05:13] Do you want to explain what we're looking at?
[00:05:16] **Aurooba Ahmed:** Yeah, so we're looking at a feedback area for a feature request for an app that I use every single day called Missive, which is an email client. What I'm kind of seeing is an area where people can create a new post or a new feature request, and then a list of all the feature requests that people have, uh, created and the ability to upvote them essentially, and see a little description.
[00:05:43] And I'm also seeing like that it looks like, you know, people can go in and comment on these feature requests, but I think the primary thing here is that you can create feature requests and then upvote them, right?
[00:05:54] **Brian Coords:** Yeah. So in, in this example, people really want an AI chat bot. So somebody submitted that as a feature request and seven people have upvoted it and, you know, theoretically the team will look at this and so, and pick, you know, what feature to work on next. Um, we are going to do this and we're going to do it.
[00:06:12] It's going to be an episode topic suggestion request so you can put in what should a viewSource episode be, and then people can upvote it and, uh, maybe we'll do it. I don't, it's more of an example, but, uh, I think I'd be curious to see what kind of, uh, episode topic suggestions we get.
[00:06:31] **Aurooba Ahmed:** Yeah, totally. And sometimes we get suggestions or people ask about things just on Twitter or X, I guess, and other places. And we could even use it as a place where we track it, you know, like, Oh, someone gave us a suggestion somewhere else. Let's pop it in there. And that way other people can see it too. So I think that's kind of cool.
[00:06:48] And even though we're not going to code the whole thing on these episodes, we are going to make all the source code available, right?
[00:06:55] **Brian Coords:** Yeah. And we'll try to dig into it, explain how we did it. And, you know, the big question is, you know, I'm looking here at a post with like a title and some content and some metadata, why not build this in WordPress? Why wouldn't I do, why, why would I use Laravel over WordPress for this little site, what do you think?
[00:07:16] Cause I have my reasons, but I'm curious what you think.
## [00:07:18] When should you and shouldn't you build with WordPress?
[00:07:18] **Aurooba Ahmed:** Well, when I look at this, I see that the idea of this is basically creating user generated content, right? It's user generated content on the front end and then giving people the ability to do a couple limited features. In WordPress, WordPress is more like content driven but not user generated.
[00:07:39] You're creating content and you're publishing it for other people and the only way they really interact with it is like maybe comments or sharing. Whereas in this one, people are sort of doing that from the front end. I don't know. When I look at this, I see this as something that could be pretty easy to make with WordPress, you know, and has some of the features you want, like the ability to log in, the ability to leave a comment.
[00:08:02] So I think it's a, this one is a bit of a blurry line, maybe.
[00:08:06] **Brian Coords:** I think that I disagree because, and you brought up the keyword, which is, the one big difference between Laravel... And WordPress is that WordPress comes with a ton of UI. Like there's a whole WordPress admin backend to WordPress and it's great. And that's super helpful. And it's a great content management system.
[00:08:25] With Laravel, you really don't have any UI until you build it out yourself. That said there are, and we're gonna talk about one today. There are tons of packages in the ecosystem that are, and not just. Not just third party, but like actual core to Laravel packages to handle a lot of these things. And so you can scaffold up really quickly to get to it, but about that kind of backend front end.
[00:08:49] If we did this in WordPress, you know, are you going to let people log into the backend or are you going to build them a custom front end UI for it anyway, that's going to connect to the WordPress database. So you're kind of doing all that work anyway. Um, so that whole, like WordPress has a backend admin designed for you.
[00:09:08] Suddenly isn't really that helpful anymore. And you're kind of
[00:09:11] **Aurooba Ahmed:** In fact, that's a con.
[00:09:13] **Brian Coords:** Yeah. It's kind of, it's in the way.
[00:09:15] **Aurooba Ahmed:** You know, when I, when I hear you talk about that, and I'm also, as I'm thinking about it, I think one of the reasons why a lot of the times you have that phase where you want to build everything on top of WordPress is because it does come with all those features. But in a lot of situations, you either end up with a situation where WordPress has too many features so it's actually really bloated for what you're trying to create, or it just works in such a different model that you're fighting it all the time. But the reason sometimes you end up there is because it has some of those core features that any kind of, I guess, application needs, some form of ability to log in, some form of database or way to save and store content and then some way to present it.
[00:09:55] But what I'm hearing is that Laravel can do all of that, but does it without that, not bloat, but like with, but giving you the option to say, Hey, I only want this part, but not this part. Whereas with WordPress, there's a certain core set of features that it's going to come with no matter what.
[00:10:11] **Brian Coords:** Yeah, I think that's a good way to explain it. Like, yes, we could do this honestly with like gravity forms and some sort of front end login plugin, or even gravity forms, I think can handle like login registration form. It's like, you could do that. You could decide where to put, you know, stuff, all these votes into post meta, um, you know, and build out a whole scheme for all that sort of stuff.
[00:10:31] Um, but. What's going to be great. And I think you'll see this is that we will get that UI pretty much immediately out of the box with Laravel and one additional package called Breeze, which is their like, if you need users to be able to log in, reset their password, uh, create accounts, all that breeze.
[00:10:53] You one line of code, it installs it, it puts all the files in place for you. It's all there. And it brings my favorite, best friend in the world, Tailwind with it, which is another situation. And you know, you like with a few lines of command, like a few command lines, we're going to give like user registration and a pretty basic UI.
[00:11:16] That's honestly pretty close to this, uh, but based on tailwind and then we can start saying, okay, now what do I want to do about the data, which we'll talk about in a future episode?
## [00:11:26] The Laravel Ecosystem
[00:11:26] **Aurooba Ahmed:** Okay, so this ecosystem, I mean, we've talked about this a little bit before, but it's a WordPress ecosystem has plugins, right?
[00:11:37] **Brian Coords:** Yes. Let's pull up. Laravel.com so we can kind of like, get a sense of this ecosystem because I think that's also the intimidating part.
[00:11:48] **Aurooba Ahmed:** Okay. I mean, I think it definitely is. You know, when you're on Twitter, you actually hear so much, or at least I do, maybe because of the kind of people I follow, about that thriving ecosystem that Laravel has. But it's such a different kind of ecosystem than WordPress, you know? And I get the feeling that it's definitely very community driven, but in a different way, I think.
[00:12:11] Right?
[00:12:12] **Brian Coords:** Yeah. I think there's... So... With Laravel there's, you can see they have this ecosystem tab here and this pops up, I mean, this is what is this like 27-30 different tools. And the thing is, is that most of these tools are more or less like first party. So when we get to like deploying it, um, you know, we're not just.
[00:12:37] You can't just like go to WP engine and say like host my Laravel site. You, you kind of have to do that more modern approach of, you know, set up digital ocean, set up a deployment, whatever, but they have something called forge that's a, you know, a system that handles that they have Herd their new like local PHP server system that handles that they have, um, one like sanctum.
[00:12:59] You need like. You need two factor authentication. You need like mobile apps. There's a system you can add for that. So there's these first class like plugins for all the different things that you need and you just install them, you know, into your application as you need them. And because they're all part of the same ecosystem, they work together very nicely.
[00:13:19] **Aurooba Ahmed:** A little bit like canonical plugins in WordPress, right? That's how it feels.
[00:13:24] **Brian Coords:** I am. I'm so on board with the canonical plugins idea and you know, would love to see those, those oft referenced canonical plugins, uh, one day show up. Um, I don't know, I don't know that we have any yet. Um,
[00:13:43] **Aurooba Ahmed:** Yeah, like, we have the performance translation one that's happening right now. Like those performance translations and then the performance lab, we do have some.
[00:13:52] **Brian Coords:** but that'll go into core. I mean, honestly, like
[00:13:55] **Aurooba Ahmed:** Well,
[00:13:55] **Brian Coords:** going to go into core
[00:13:57] **Aurooba Ahmed:** Yeah. So like it is similar, but it's not the same because in WordPress, eventually those things become part of that base package. But here in Laravel, it doesn't become part of that base package, but it still has that high level of support. That's what you're saying, right?
[00:14:12] **Brian Coords:** Yeah, because like, honestly, most of my sites won't have translations. Right. So I don't really need that in core, but it's, it's a great thing. And, uh, I have one site where I actually use it and it's great. Um, but again, like. Yeah, everything sort of ends up in core or, you know, it ends up sort of like, you know, buddy press or something where it's there, but there's not like, it's not really officially supported.
[00:14:36] Like Laravel is an organization has these things and they very much support them. They're canonical. And then there's a broader third party ecosystem. And as you get into that, there's a few names where you go, Oh, they made this. I can trust that. I can rely on that, that sort of stuff.
[00:14:51] **Aurooba Ahmed:** but here on the screen, smack dab in the middle. I see Livewire, but we know that Livewire wasn't built by Taylor Otwell. Right? Who is the founder of Laravel? So, why is that here?
[00:15:03] **Brian Coords:** Why is Livewire there?
[00:15:05] **Aurooba Ahmed:** Yeah.
[00:15:06] **Brian Coords:** yeah, so that's a good question. I don't, you know, if, and just for context, Livewire is basically like, Basically, like I want to build a, a react app style, single page, live hot reloading application, but do it all in PHP. And if that sounds interesting to you, then you're going to love Livewire.
[00:15:24] Cause that's what it, what it does. It's like single page app, everything hot reloads, everything goes straight to the server, super fast, and you don't write JavaScript. Um, but like. I don't know. There is a blurry line between the community and, and, and, you know, alongside of that is documentation, right?
## [00:15:44] Documentation in the Laravel world
[00:15:44] **Brian Coords:** So Laravel has very good documentation.
[00:15:46] It's very well documented. Um, it has to be because everything you think you're going to write code for, it's already there. Like, I'm going to, like, you want to write, you're not talking to the database. There's a query builder, uh, like constructor. That's amazing. And handles all of your queries.
[00:16:03] There's things like all of this stuff, but you do have to dig through documentation to find it. Once you go to that third party world, like Livewire, for example, the documentation thins out a little bit. The, the video documentation behind a paywall comes up a little bit, and that is a bit of a trade off, but you do feel good because you are supporting them by paying for their documentation, I guess.
[00:16:29] And you don't technically have to.
[00:16:30] **Aurooba Ahmed:** Yeah. And I'm not going to lie, as a model for supporting open source work by having better access to more detailed documentation. I mean, that's not terrible, you know, that's a nice way to do what you need, but also support the people creating the things that you need, something that we could use a little bit more of in WordPress.
[00:16:50] **Brian Coords:** I mean, at the end of the day, any framework is meant to save you time and you can do it. The fact that it's open source and you can do it for free and nothing's ever going to stop you is already amazing. And if you want to move a little bit faster and watch some videos, uh, Laracasts is like the official Laravel kind of video library.
[00:17:08] That's amazing. Great courses, um, that you pay for, or like LiveWire has its own you kind of pay for, as you dig into this other projects like Alpine and Tailwind stuff, you'll see like, they each kind of are like sponsor us on GitHub and you'll get more training and stuff, but you, you don't have to.
[00:17:24] **Aurooba Ahmed:** Hmm.
[00:17:25] **Brian Coords:** but you got to keep that documentation, you know, some level of open, you know.
[00:17:31] **Aurooba Ahmed:** Yeah. Oh yeah, I mean, people have to have a place to kick off. Yeah, that's fair. That's fair. So the one that we're going to be using in this project for suggest an episode for viewSource is, you said, called Breeze, right?
[00:17:44] **Brian Coords:** Yes. So this is another place where it gets a little tricky. Like there's a ton of these packages and it's, you kind of want to be really strategic in what you're going to do. Like if we wanted really intense authentication for users. Then maybe we would start over at Sanctum, which I think has a little more aggressive, uh, like security and that sort of stuff.
## [00:18:06] Using Breeze to spin up a login system
[00:18:06] **Brian Coords:** Breeze is a starter kit. So, um, they give you like a little screenshot here, but like, this is literally what it makes for you. It looks kind of like the WP login screen, um, to make an account, register account, um, to do email, uh, confirm passwords, all that stuff. And then that's it. It doesn't do anything else.
[00:18:26] Like it just gives you those things and a few like chunks of UI for managing your account. Um, and then beyond that, it's kind of on you
[00:18:36] **Aurooba Ahmed:** I mean, that's kind of perfect because sometimes I know in the past, there have been times when I spun up WordPress because literally that was all I needed. And that was the fastest thing I could think of, but Laravel seems even faster and only gives me what I need without everything else that I might not need for a particular project.
[00:18:55] So that's pretty awesome, actually.
[00:18:57] **Brian Coords:** and, and this is not, you know, this is an actual template file in your repo now. So like, it doesn't have to look like this at all. Like this, you know, it comes with some tailwind, you know, classes and stuff, um, that go into the build process. So that's where it starts to get a little more opinionated, but like.
[00:19:13] You can strip all of that out and you could have your own design framework on top of it versus, you know, the wp-login.php, you know what I mean? A little harder to style.
[00:19:23] **Aurooba Ahmed:** Yeah.
[00:19:25] **Brian Coords:** that said, let me see if they do another screenshot now. So then, that said, the downside is, um, in WordPress, you have a UI to look at all of your users that have created accounts, right?
[00:19:37] And you can kind of modify users. That's not going to come here. Once you get to that, you want that UI, you have to build that yourself. Or use a tool for it.
[00:19:47] **Aurooba Ahmed:** I bet you there is some sort of 3rd party thing that you could probably plug in because it's probably such a common, like, request. Um. Or maybe it's a easy thing to maybe PR into Breeze. Anyway, that's where my head goes. But yeah, I... Immediately as we're talking about this, I can see a lot of advantages to this.
[00:20:08] And situations where sometimes you just need a little something small. And it's like the WordPress for applications that aren't content driven. Or are not necessarily like publishing driven. You know?
## [00:20:22] How Laravel gives you momentum
[00:20:22] **Brian Coords:** Yeah, I think so. And it's also, I think, you know, I like, and I really like to use the word like momentum a lot. Like it gives you a lot of momentum because you can get from like zero to like an MVP super fast. Um, like. I'm, you know, for what we're building, I don't, we don't need a screen to look at all of the users that have created an account.
[00:20:40] We can just open the database, um, and look at it. We don't need different auth permission levels to say like, well, when I log in, I want to see this. And when they, like, we kind of don't need that yet. And in deal, like we can add it, there's packages for that, that are. Layered on top of Breeze to do all that stuff and add roles and permissions.
[00:21:00] But like, we kind of just like, we don't need it. We want to get straight to the functionality that's critical and get something out of the door.
[00:21:09] **Aurooba Ahmed:** Right. So, it's probably going to be really, really fast. You'll include Breeze, you'll add a little bit of a front end, some publishing things that we'll get into, right? I mean, that's really neat, honestly. Like, it's pretty cool. Like, it sounds a little bit magical. Like, a little bit like how WordPress felt magical when I wanted to spin up just a regular blog. Yeah.
## [00:21:28] Every framework has a learning curve
[00:21:28] **Brian Coords:** Yeah. I'm I've, I've been back in my early WordPress days where I'm constantly looking in documentation, like now in WordPress, it's like second nature, but like, you know, when you're new and you're, you're looking for, all right, I know there's going to be a function to do this. What is it like that whole thing?
[00:21:44] Uh, Oh, for sure.
[00:21:46] **Aurooba Ahmed:** Yeah. Yeah. And I mean, that's not a bad thing, right? But it's a, it's a natural part. It's a natural part of the learning curve of any new framework or language that you might get into. But the fact that that documentation is there, the fact that you have something you can look into, you just have to look in the source code just to figure out what's going on.
[00:22:06] Um, it sounds really awesome. And I'm really excited for us to dig into it a little bit more in our next few episodes and sort of see this application come to life in Laravel.
[00:22:17] **Brian Coords:** Yeah, and I think like you said, learning is such a big part and because it's a vibrant community, uh, you know, there's a lot of blogging about it. There's a, it kind of reminds me of WordPress in that way too, where there's a lot of people making tutorials, making videos, sharing what they know, um, you know, that same open source spirit, uh, is super prevalent.
[00:22:40] **Aurooba Ahmed:** Definitely. Which is why I think it's really cool to dive into it because not only is it an open source community that's different from WordPress, it's something that we can maybe learn from and look at, you know, here's how something in another thriving, vibrant, profitable, amazing community is happening.
[00:22:57] And then. See, how we can take some of those learnings and bring that back to our own community.
[00:23:04] **Brian Coords:** Yeah, because it's a different use case for sure. They serve very different purposes. If you're like dealing with a lot of content management, you're dealing with a marketing team that wants a visual experience, like the block editor, um, if you're, you know, dealing with SEO and all that stuff, you really don't want to roll all that stuff yourself.
[00:23:19] You want to just throw a WordPress, throw on Yoast and like get moving. So there's definitely different use cases. So I'm excited for our next episode. We'll dig like into the source code. We'll talk about like how we get like, well. We'll throw up this, we'll throw up a couple like little pieces of data and we'll show how easy it is, you know, almost as easy as registering a custom post type to create your own little database tables, have a store your information, uh, migrate and everything.
## [00:23:46] How to get started with Laravel
[00:23:46] **Aurooba Ahmed:** I mean, that's super enticing, and I'm really looking forward to that. But I do have one question before we wrap up. How do you start? With WordPress, you know, for most people, they go to a host or if they're starting locally, they have MAMP or local and they just go start a site and it installs the packages for you and then you go into the browser and you log in.
[00:24:09] How do you start with Laravel?
[00:24:11] **Brian Coords:** So at a base level, it's PHP and it's very composer driven. So everything you see here, um, is based on composer and everything is installed for composer. So, um, I'll just zoom in on just some like example commands. You're, you're going to like do one, you PHP running on your site, on your, on your computer.
[00:24:36] They have this thing called herd, H E R D. That's like a no brainer PHP server. You literally turn it on. PHP is running. If you don't want to deal with like homebrew and all that sort of stuff. Um, and you literally open up your command line and you do a composer, you know, start project and start the actual project, and then you start adding the packages that you want.
[00:24:56] Um, and then it. You just turn on the server with, uh, with another command. It's pretty simple in that sense. Um, but if you're talking about, you know, long term, yes, you do need to kind of know a lot about version control. You need to use git to manage the code and probably deploy it through git. Um, like I said, it's not, you know, put a zip file on a server with SFTP. There's a little bit more to it than that, but again, the ecosystem is super, um, robust. And even if you've ever used a spin up WP, which you introduced me to that kind of comes from this mindset of like put everything in a repo, deploy it, you know, through a third party to AWS, to DigitalOcean, to whatever other server, um, like once you've done it once or twice, it feels super easy.
[00:25:47] **Aurooba Ahmed:** Okay, so what I'm hearing is, even though there is no UI to start with, and everything's in the code, there is kind of like an equivalent five minute install,
[00:25:56] **Brian Coords:** Yeah, you run that composer
[00:25:59] **Aurooba Ahmed:** sort of.
[00:26:00] **Brian Coords:** and I'll show you like, you'll get this screen running on a local server. You can see, um, so I'm showing a screen with my like local host, you know, IP address and, um, you know, some example code and then all of this is PHP and I'm going to, you know, I'm going to go straight to the code editor and start saying, Nope, this is what I want the PHP to do.
[00:26:19] They give you one screen of PHP and that's about it. And that's kind of all you need.
[00:26:24] **Aurooba Ahmed:** mean, that sounds perfect. That sounds awesome. Okay. Good to know. Well, I'm excited in our next episode to dig into more of that code and talk about data and the custom post type little teaser that you just gave us. That's going to be cool. I think.
[00:26:38] **Brian Coords:** Yeah. Looking forward to it.
[00:26:41] **Aurooba Ahmed:** All right. See you all next episode.
## [00:26:44] Conclusion
[00:26:44] **Aurooba Ahmed:** Visit viewSource.fm for the show notes and if you're enjoying the show, we would love a review on iTunes or a comment on YouTube.