YouTubevideo· Oct 3, 2025· 17:25

Laravel with AI is just TOO good

Watch on YouTube ↗

transcript

45 moments
  1. So if you were to take your favorite AI tool of choice and ask it to build anything, usually it wouldn't start building it in Laravel, usually it reaches for something like React Nex.js.

  2. That's just what it knows. But just because it chose it doesn't necessarily mean it works best with it. I think that there's always going to be issues, partly because of the JavaScript ecosystem as a whole. So here's three reasons why I think frameworks like Laravel actually just work better with AI. Reason number one, we'll call this seniority. It's battle tested. Frameworks like Laravel, they change.

  3. Yes, they get updated. There's a lot of brand new features, but usually those changes are not what AI cares about.

  4. Why? Because AI just cares about if the application is actually working. But what does this actually look like practically? Does Laravel and frameworks like it actually change a lot? I don't think so in the grand scheme of things of what AI is expecting. For example, if you take a look at Nex.js, which any AI application is probably going to pick that if you don't specify something or if you're not specifying a particular framework, language, whatever, usually it's going to default to something like Nex.js, if not just pure React.

  5. And Nex.js has app router, but also pages router. Okay. Well, what if you want one over the other? What if you prefer app router, but your LLM automatically chooses pages? And now you're almost starting from scratch. Of course, yes, it's backwards compatible for most things, but there's very few reasons why you would mix and match.

  6. Even within this, there's preferences on if you have like a source folder or directory or things like that, which LLMs don't know, but then maybe you have a preference as a developer. The point that I'm trying to get across is that the JavaScript ecosystem changes so frequently, especially with things that you can't necessarily just have complete backwards compatibility that LLMs are going to be confused unless you feed them direct documentation, which is getting easier, granted.

  7. Now, on the Laravel side of things, the biggest shift in update when it comes to application structure, which LLMs care about, especially because they're usually more outdated in that sense, is in Laravel 11, which was released in March of 2024. And this was the biggest shift in quite a few years, even before that, where it simplified the application structure. Now, here's the key point I want to bring as well.

  8. When you think about uh just how longstanding a lot of these changes are when it shifted for using this app.php and your bootstrap folder, your bootstrap/app.php to declare things like uh middleware or exceptions. And before in Laravel 10, it was all in this kernel.php file. Of course, not a huge shift, but most people would prefer the upto-date standard.

  9. And that's just funny because uh LLMs, even if they opt for something that is at least 2 years old, it's still going to work. It's backwards compatible. And if this is the biggest change that a framework like Laravel has, then LLMs are going to love that.

  10. Now, yes, there's a lot of updates and new features within Laravel that LLM might not use, might not be aware of because it does change frequently in the sense that new things are added. But because there's so much that doesn't change in the sense of it actually working from a barebones standpoint, LM usually do better with stuff like that with Laravel, with Rails. But what about the stuff that does change within your Laravel framework? new features, new additions that you do want your LMS to be aware of. Can this be better than the JavaScript ecosystem? I think so.

  11. And it's mostly because of one recently new package in the Laravel framework, and that's Laravel Boost. It's an accelerated AI assisted development tool that allows you to have the context and structure that AI needs. This is where I'm going to spend the majority of time in this particular video, mostly because I just want to show you what it looks like if you didn't have Boost versus if you did.

  12. And while this is Laravel specific, there's a reason why I think AI loves frameworks like Laravel and not just Laravel specifically because I think there's benefits to things like this being aware of everything that you might need within a particular framework. So if other frameworks start to build their own version of something like Laravel boost and I think it's for the better. Why? Because then LLMs know exactly what they need to know in order to make a great application within a particular framework. So in a nutshell here's what Laravel Boost does.

  13. It becomes aware of your Laravel application because it's built by the Laravel team. So it knows here's the things you have installed within your layer of application and then also here's what usually people do with those things in your layer of application.

  14. So this uses uh the ability to read specific packages, read specific uh integrations that you might have like whether those are Laravel first party or even third-party packages and then it gives your LLM tools to be able to call

  15. or do things with those packages even reading from your database being able to do that in a concise manner and then the neat part is it uses documentation for all of those tools that you might have to be able to say okay this is the up-to-date information about this particular framework or this particular package that you have installed. These things just seem common sense really, right?

  16. Because if you know that I have an Nex.js application and I'm using, I don't know, Terso with this with Drizzle, all of a sudden you know these are the things that you should be able to build with. But if you're just starting from scratch, then LMS might just kind of pick and choose what they want. But if you already had most of this implemented, then it becomes a little tricky because it needs to work within the confines of what you already have. Yes, this is what planning mode is for. But what if you didn't have to do that?

  17. So in this particular demonstration, I'm not going to show you everything that the LLM is doing, but I have an LLM running in a Laravel application with React and Inertia without boost. And then I have a Laravel application running with Boost with the same setup. And I'm going to use this prompt that someone did uh for lovable replet v0ero and bolt which is basically this prompt of designing a personal to-do list tracker. And he kind of went through of okay uh which one did the best?

  18. It was meant to be like mobile first but it's one of those things where okay each one of these they technically have their own version of boost installed right because each one of them it's not like it's choosing oh we're just going to pick a random framework. Most of them have their own preference and most of them is probably Nex.js.

  19. Well, ideally, if I was using clawed code without boost, it's going to maybe just kind of hallucinate some things. It probably is going to eventually figure out that I have Laravel installed and react and inertia, but it's not going to know how to use those things. And that's where Boost can come in. So, I'm curious to see the difference. So, I'm curious to see what you think of those differences, not just the differences between all of these four and Laravel, but specifically how big of a boost Laravel boost makes.

  20. And again, I'm not going to show you everything, but even just in the initial setup, you can see it's already having issues. Why? Because it doesn't necessarily know what's already installed. I'm installing or I'm running this in a directory that already has Laravel, Inertia, React, and a starter kit installed and it's trying to update the package.json with things that I guess we kind of need, but it doesn't necessarily it had some issues cuz it was trying to write it, I think, before actually reading it, making sure that actually existed.

  21. Whereas with the boost side, all you need to do is after installing the boost package, boost install, it gives you specific install setup. So maybe I want to use yes, the boost MCP server and the AI guidelines. So again, this is not just calling specific tools. This is also, hey, here's a set guideline specific for the things that are already installed. So I'm going to do that. I'm going to say I want clawed code. So install specific instructions, rules for claw code. And then we'll go ahead and get that going.

  22. And so now the great thing is I'm going to use the same prompt, but you'll automatically start to see like this uh we have some new MCP servers already found. So clawed code even with that same prompt, no changes, is automatically going to start calling some of those tools right off the bat.

  23. And while we have errors on this side, mostly because it's trying to probably write to things that already existed or maybe it's trying to overwrite things that doesn't need to know or necessarily overwrite. Uh in this case, it's creating a store which I don't think we necessarily would need or use most of the time within a Laravel inertia application. On this side of things, the first thing that it starts with is application info. Again, all of this is not meant to say, okay, the whole reason the AI works great with Laravel is because of this.

  24. I think it's a big reason, but it's something that I kind of think that most frameworks should have at some point in time because it makes it easier for LMS to understand how should I work with this, especially when things are a little bit more opinionated.

  25. And even if you still have that flexibility within JavaScript frameworks within I don't know elixir and Phoenix you still have that flexibility of saying okay these are the specific front-end tools I want in Laravel you have the same thing but if you could say here's how all those tools usually work together and be opinionated about it then all of a sudden things like LLM's building applications and doing it the proper way if you will it

  26. just becomes easier taking a look at the one without boost this doesn't necessarily negate hate my first point of AI working great with tools like Laravel because it is kind of battle tested. There's existing evidence because nowhere in this prompt did I ask it to work with Laravel. It's just using the prompt that I gave.

  27. Well, in this particular instance, it's probably still using inertia, maybe like existing pieces, but it's using a react store rather rather than using like a model and migration within Laravel. Of course, if I had modified that prompt and I said, okay, hey, do all this but build it within Laravel and the application and directory is already set up, it probably would do a decent job.

  28. But this particular test is more meant to show you the difference between no boost versus boost with a generic but detailed prompt like we saw. Before we get to those final results with boost, can you do me a favor? Hit the like button for this video. Subscribe because looks like 80% of you are not subscribed and you're watching this video. So it helps me out a lot. Thanks so much. So the boost one definitely took a little bit longer mostly because it, you know, it did a lot more.

  29. It worked with Laravel more and it also even at the end it double checks it using the get absolute URL tool. It's saying hey I'm grabbing the dashboard and making sure this is correct. Unfortunately the one without boost uh it just didn't work. So if I open this up with composer rundev and pull this open here. Uh yeah it didn't work mostly because I think it was trying to build a React application and didn't know it was in a Laravel inertia app.

  30. But this is the first time I'm going to check and see what's going on with this one. So, I'm going to run composer rundev here. And looks like we have a port 80002. Let's pull this up.

  31. Okay, we're logging in. It gave us a test user because that's the seated information, but I think it changed that from standard. So, let's go ahead and check. Okay, test atample.com with password. Let's try that out. And so, this is the starter kit. Log in. Just one small fix I needed to do. And again, I don't know if that uh Twitter post actually was just a oneshot. There probably was some back and forth of saying, "Hey, this doesn't work. This does work." Especially to get it started.

  32. Uh but this was just a simple, it was using a JSX extension instead of a TSX extension. Let's have a look. And this is what it looks like now. Let's go ahead and make this a mobile view. All right. Looks like fairly mobile first. We do have that uh seated data for us.

  33. So, total tasks of 15. Let's go ahead and maybe mark off some more. Okay, we get some errors. That's okay. Let's go ahead and create a new one. Looks mobile first. We'll set a date. All right, we have the new one. So, it looks like creating one isn't necessarily so some sort of authorized error. Neat thing. This is Laravel. So, it becomes that much easier to do something like this.

  34. Uh, we can just say, hey, let's copy this as markdown. And I'm just pasting this in to clawed code for example. All right, a few back and forth. Mostly just, you know, small things that need to be touched or changed. But we have all the uh looks like the animation we do. Let's see. We do not have drag and drop. So, let's go ahead and just make that happen real quick. Looks like everything is now up to speed. We have the completion rate that goes up as we go. We have the number of in progress.

  35. We have the number of completed. So we have in progress view. That's completed. Looks like we have pending. Okay. Looks like that filter doesn't work. Uh but yeah, it looks like the actual number of completed. That's probably because I don't know how to set it to in progress.

  36. Maybe. Yeah, there's no in progress way of setting it. Looks like uh but yeah, all this is looks pretty nice. But again, the benefit of it is that we have a tool that's in the Laravel framework, the Laravel ecosystem to say, "Here's how LLM's listen up. Here's how to use all of these packages, all these tools."

  37. Did it get perfect? No. We did have some back and forth. We did have a couple of just small tweaks at the end. Again, I think I only did prompts like three different prompts at the end to kind of fix things, but for the most part, everything was correct. And you still have this good base plate that you can then uh move to with a full backend with a full uh status that you can then create into an application. And the third thing, it's kind of related to Laravel Boost in a way.

  38. The reason why AI loves Laravel or just frameworks like Laravel is most everything that you need within an application is under one umbrella and AI doesn't have to think okay now if I want to I don't know use a

  39. database I have to think okay what tool should we use for a database and then I have to install that and then I have to make sure that that's working with all the other packages that we have well even though everything is under one umbrella boost still helps with that to say, okay, you might use all these different tools, Inertia or React or Shad CN because it's part of the starter kit. Well, how do all those pieces work together? Because everything's kind of under one umbrella, it makes it a lot easier.

  40. I think one of the tools in the JavaScript ecosystem that is slowly trending that way that I'm excited for is Astro in the sense that it's not just a content-driven web framework. It also has a way to officially interact with things like UI frameworks. So you have a flexibility while also still being this one way to use pact within Astro.

  41. There's this one way to use SolidJS within Astro. Uh there's this official san sanctioned way to use a DB within Astro. And yes, places like Verscell are kind of making this a little bit better in the sense of okay, if you want to use spelt, well then Verscell has an easy way to kind of hook up a database and it's all through their hosted platform.

  42. That's great. But at the same time, does your LLM know that? Most likely not. So LLM do great with having guidelines, with having a structure in which to work with. And yes, even if you just did a generic prompt, it's usually going to choose all the tools that you maybe as a JavaScript person might be working with.

  43. But if you're not, well, then you have to start with giving guidelines and giving prompts and being detailed. And I think Laravel just works great with that. Not just because of tools like Boost, but because of its seniority and because everything exists in one umbrella. So yeah, maybe other frameworks can learn from that because I think LLMs are definitely learning from it. How can it make it easier? I think tools like Convex are doing a fantastic job at that.

  44. I have a video talking about how I like what Convex Chef is doing mostly because it's all wrapped up into one. It's it's LLM tool knowing how to work with Convex and everything that Convex offers. And so as you're building, as you're learning, as you're growing, there's a lot to lot to be said when it comes to how LLM's best work and maybe how you might boost LMS as well.

  45. So keep creating.

just you here