How Good Is AI at Writing Laravel Code? A Live Code Review w/ Jake Dohm
Chapters9
Hosts introduce the live stream, set expectations, and discuss initial gear, drinks, and a quick overview of the session.
Jake Dohm shows a live AI-assisted Laravel MVP build, using Claude/Opus through Cursor, Boost, Inertia, and Reverb to ship a functional app fast — with honest notes on where AI shines and where human tweaks still matter.
Summary
Jake Dohm leads a candid live code review of an MVP vibe-coded with AI for Laravel. He and teammates explore how Claude-based models (via Cursor) generate Laravel code, guided by Laravel Boost and a carefully chosen starter kit. The discussion covers architecture decisions, model choices, and how live features like chat and real-time updates were integrated with Laravel Reverb and Inertia. Jake starts with a clean Laravel 12 base, adds Boost, and then iteratively prompts the AI to flesh out controllers, views, and tests, while he reviews for sensible structure and maintainability. A standout moment is the AI’s ability to wire up Reverb for chat and to suggest end-to-end wiring (front-end through to sockets) with minimal handholding. They also dive into testing, with 125 tests all passing, and reflect on the balance between CRUD patterns, invocable actions, and project organization. The team emphasizes updating custom “skills” to inject their preferences (opinionated lint for UI, nested layouts, and better use of Inertia forms), and they acknowledge the gaps (UI granularity, refactoring opportunities, and the need for more strict testing discipline). The stream closes with practical takeaways about when AI accelerates building, how Laravel’s opinionated structure helps, and how this workflow could evolve with richer tooling and more tailored guidance from Boost and skills. Overall, it’s a pragmatic look at leveraging AI to bootstrap Laravel apps while preserving architectural intent and quality checks.
Key Takeaways
- Claude/Opus 4.5 via Cursor was the primary AI engine, used in plan-and-execute prompts for MVP features.
- Jake started from a clean Laravel 12 base and then layered Laravel Boost, Inertia, and a starter kit to seed the project.
- Live features were wired with Laravel Reverb for real-time chat, including local setup and queue considerations.
- 125 tests, all passing, demonstrate AI-assisted test generation and ongoing test maintenance during feature growth.
- Skills and prompts were iteratively tuned: UI rules, nested layouts, and avoiding CRUD bloat by favoring invocable actions when sensible.
- Front-end decisions leveraged Inertia Vue with delayed form logic to ensure a visible loading state and better UX.
- Jake’s workflow shows how updating a skills file with observed outcomes reduces repeated missteps and speeds future iterations.
Who Is This For?
Laravel developers curious about AI-assisted coding workflows, especially those who want to bootstrap an app quickly while maintaining Laravel’s conventions and quality. It’s especially valuable for teams exploring AI-assisted MVPs, frontend-backend integration with Inertia and Reverb, and the use of Boost to guide architectural decisions.
Notable Quotes
""How good it is at writing Laravel code? probably better than you.""
—A teaser of the live code-review premise and AI’s perceived capability.
""125 all pass tests with 404 that are passing test, baby.""
—Jake highlights the test results as a core validation of the AI-generated code.
""Use delayed form... to show that spinner for at least 300 milliseconds.""
—A concrete UX detail where AI-assisted code improved front-end behavior.
""I updated my skills... read the skill and correct this yourself so that I could get it right the next time.""
—Illustrates the feedback loop: refining AI behavior via skills.
""Laravel Boost... guides your different models and skills and things that I wrote throughout.""
—Notes how Laravel Boost helps shape the AI generation and structure.
Questions This Video Answers
- How reliable is AI at generating Laravel controllers and routes in a live MVP?
- What are Laravel Boost skills and how do they influence AI-generated code?
- Can AI-driven MVPs in Laravel reliably implement real-time features with Reverb?
- What are best practices for testing AI-generated Laravel code (Pest vs PHPUnit)?
- How can I set up Cursor and Claude to build Laravel apps faster without sacrificing quality?
LaravelAI-assisted codingClaude/OpusCursorLaravel BoostInertiaVueReverbLaravel CloudLivewire (inertia)
Full Transcript
I think should be live most places. Okay, there we go. They should be live now. Fantastic. Hi everyone. Hi Florian. We'll give people a few minutes to trickle in before we jump into it, but this will be a fun stream. We have Josh and Jake here with me. Hey guys. Are they like name tags? Oh, sorry. I opened it just our name tags disappeared. That's what I was looking. Why? What is going on? Streamyard. Good little question. I swear they were there before, right? Or am I tripping? Um, maybe not. At least since we we got in I mean they've been they've been here before, but yeah.
Um I mean it should Carl says he's going to go get a Coke Zero, so we got to wait. We got to wait for him. Okay. Who started this thing in the Laravel ecosystem? I know there's a couple die hards. Francis, I think, is a Coke Zero man. I don't know who else. Aaron Francis would probably be more of a Diet Coke man, but I think Did he diet? Oh, yeah. He's DC. That's bad. He's diet coke. But it was it was all Taylor for the most part. Yeah. Florian said it was all Taylor. But the funny thing is Taylor doesn't discriminate either.
He said on streams before that Pepsi Zero is fine, too. And Pepsi most people call that heresy in a lot of ways. No, it's good. I would say Pepsi Zero definitely over Diet Coke. Really? Diet Coke doesn't do it for me. No diet coke all day. I'll drink Diet Coke. I like Coke Zero Butter because I grew up on Diet Coke, the caffeine-free version, you know, like the gold can. Yeah. Not gold DC. It's a top tier design. But I mean, once it's diet and caffeine free, what are we doing it for? You know what?
What's in there? What's left? I've got me a Mountain Dew Baja Blast. Zero. Zero. Wow. Man of culture. I have coffee in a Beatles mug. It's loaded up. Do you ever drink? I'm working on a rain sponsorship because I I just spend too too too much money on energy drink. So, if anyone has a hookup, hit me up. Oh, there you go. I see the tags now. Oh, yeah. What? I didn't click anything. Was it the comments? Maybe. Who knows? I don't think so. Oh, maybe when it's going in comments goes away or Okay, very interesting.
I've never noticed that before. There you go. Adam Wild too. Oh, the UI. Yeah, which I don't I feel like I don't see Adam talk about Cook Zero a lot. Yeah. See him talk about Maybe I just missed it. Talk about weightlifting a lot. Mhm. I see his walk little podcast stuff. I know. You got to bring that back. I think it's been a while since the last one. People love it. He got too many good ideas from it and now he's just working on them and depriving us of his thoughts. I love it. And then Adam's a monster man.
I love monsters. I had to stop myself because me and white monsters. Well, I loved him too much. The white monsters. Yeah. The best one. I have been in a besides zero. So I got I even have a Dr. Pepper Zero lined up. So, I have like double, but besides stuff, I have been really into Liquid Death iced teas recently. That's been my go-to. I just finished like a 24p pack in two days. I'm really biased about tea because I'm from Florida, but I'm from like basically Georgia. It's like Georgia, Florida. So, I'm very opinionated about tea and I really only drink tea if it's like super sweet tea, like to where you will feel sick after drinking it.
So, I can't really do like Liptin or any other teas. Yeah. McDonald's level sweet tea with, you know, 200 grams of sugar or whatever it is. At least at least 200. I was the uh I I used to uh manage a Chick-fil-A and our sweet tea had So, like it was literally like a huge scoop and each tea thing was like three scoops. M. So it's like I was like, "Oh, this is a lot of sugar." We didn't have like a diet sweet tea. We had diet lemonade. Yeah. Which has like Splenda instead of sugar.
But sweet tea was just pure sugar. Yeah. Diet sweet tea just sounds wrong, you know? Either do it or don't. Be in or be out. I don't know if you do it with stevia and you put enough. Yeah, Stevia seems good. Yeah. I mean, says the guy drinking Coke Zero, which is which is the same thing as either be in or be out. I'm like, no, I'm in gonna be in the middle. I love what uh Yeah, I love I love that comment. I just asked how good it is at writing Lar responded with probably better than you.
I want to know which model this was. Respond in the chat. Got to think it's one of the spicier models like Grock or maybe Claude. How spicy is Kimmy? I haven't played around with like Kimmy that much. Me either. It's It's It's a very nononsense one, so not really super spicy. It's just It's just very fast and no nonsense in my mind. No fluff. Opus is very nice and a lot of fluff. Yep. Yeah. Well, we know he's not writing. We know he's not running GPT because it would have mentioned like, you know, my gremlins are better at writing than you are or whatever.
Good old Gremlins. I think I've trained GPT to respond the way I want because I'm like, is this a good response or not? Like I'll ask it dumb things. It's like, does this make sense? And it's just like, yes, this makes sense. Yeah, it was. Groc called it. called it. How's everyone doing today? I had to think about what day it is. But yeah, how's everyone doing on this this Thursday? Not quite Friday yet, but almost. Lovely lovely Thursday morning for me still. But afternoon for maybe most people. Yeah, early afternoon here. It's rainy. It's a little bleak.
It's um it's not snowing here today, but it's still pretty snowy. We had like a winter storm the last two days. Yeah. So, we had a lot of snow. Wait, did you say you're in Georgia and you're getting snow? Oh, I'm in Colorado now. I'm from I'm from like Georgia. Yeah. Yeah. Okay, cool. I was like, whoa. It's like what did I No. Um, but I think the Northeast is going to get hit again by an Arctic blast this month. Wow. Wow. I saw someone. Hold on. I'll try to find it. Which is crazy cuz like we had a pretty mild winter in Colorado this year and then the Northeast kind of got slammed a few times.
End of the work day for Florian. Evening here. trade with uh Ribbit. I'd have you. I know you said you mentioned also something earlier about uh give you an idea. You're ready. You want to rock with Laraveville, but I've got plenty of ideas. I don't know. I've got good ones. I've got a lot of ideas. Oh, do you have um like any shorts you'd want to share though that could be applicable for like ideas? cuz I feel like you've been cranking out some cool shorts or like Kristoff's video and um what is it like the one game video he made?
Yeah, that one is a good So, on the on the Laravel official channel, be sure to like and subscribe and if you if you aren't already, especially for this video, but uh on the Laravel official channel, there is uh a video that Kristoff has made about um AI specifically where it is building a game with AI. Um, one of the shorts that I just recently released that was really fun and is might might spark some ideas for you is like a live Pictionary game. Um, it uses Laravel Cloud and all of that was pretty much vibe coded, I guess, if you want to say that.
I I did look at the code. So, a little bit different than what we're going to get into today, but uh that might spark some interest too. Laravel reverb is not just no live notification which you can draw and see people draw it to. It's actually live at pictionary.l.cloud. I have not tested it since it since it went up but it did work at one point. So hopefully those are some ideas. Laravel reverb is is fun of ideas. Full of ideas I should say. We've got reverb reverb rocking in the app we're going to look at today.
So fantastic. Also running on Laravel cloud and local. And local and local. There you go. It's a lot easier when it runs local. Yeah. Nice and smooth. I do want to know in the comments how good people think this code's going to be. Just before you see anything, we haven't we haven't all looked at it uh individually. Are you going to go do you think it's like junior level, midlevel, or senior level? Laravel code knowing that it's like 99% vibe coded. Got some plan mode in there. We got all the AI tools hooked up, but 99% written by Opus.
Carl does not like else blocks. We found this out yesterday. So, this is saying he doesn't necessarily think it'd be up to his standards. Yeah. I'd love to know what people think the quality would be like. We're going to put that in a skill, Carl. No else blocks, whatever you do. And then we'll see if it uses a skill or not. And then I also dropped the link in chat for the one short that Josh was talking about on the Pictionary app. And then I accidentally posted the same link twice, but both of these links are for Kristoff's video on building with the Larville AI SDK.
It was a D&D game I think he built. But yeah, let's like while chat is responding of how they think the quality will be, let's kind of jump into it. So today we're talking about how Jake vibe coded about 99% of a MVP that he built using Laravel. He used Clawude to generate the code. Um like he said, he hasn't really looked at the code. Me and Josh have not looked at the code at all. So today we're going to be reviewing that code to see how well how good of a job AI does at generating Laravel code.
Um but before we get into the actual code, we're first going to kind of just go over the process of how Jake created this app. Kind of like maybe the type of prompts he used, uh models, stuff like that, and then like if you use any tools like Laravel Boost. But we're getting some answers here. Okay. Aaron said midlevel, which I feel like that's like it's like a good I'd be pretty happy with that. So, I'm curious, Jake, as like those answers are rolling in, uh, one, what model ID or like agent harness did you use?
And then two, did you use uh, Laravel boost or any other additional skills besides just the ones that boost provides? Yeah, I think that could help us like guess as well. Yeah, that's a great question. So, I decided on two things right at the beginning of the project. Um, I'm a cursor man and I've been really digging that. I just like being having the kind of IDE hybrid situation going on. So, um, I was in cursor I think I started off on two and during the project ended up on three. Um, so cursor as a harness mostly running Opus 4.5.
Um, 4.7 I think or 4.6 and then 7 came out during Is is 7 out or are we on 4.7's out, right? 4.7. Yeah. Yeah. So expensive. Um, yeah, I demoed that on a feature or two and I just didn't see a significant difference in output as far as like the strategic thinking when I was talking to it or the quick code review that I would do when it spit something out or results as far as like UI code. And so I was like, listen, I'm not trying to just burn tokens. I'm going to stick with 4.5.
So majority 4.5. I ran a couple things through composer um and a couple smaller tweaks like hey change this button color. I just flip it to auto to save those tokens. But anything significant I would run in plan mode in uh cursor have it give me a plan have it ask me questions and prompt back and forth and then once I was happy with the plan looking at some of the architecture and some of the patterns that it wanted to use. Um, again, I'm I can give a little bit of background like my Laravel experience up to this, but I probably wouldn't even know enough to make the best decisions, but I do know enough to call out really bad decisions.
So, I would try to get a good plan and then prompt it to run and any plans planning and execution for significant development was opus. Yeah, I would love to know more of your background with Laravel too before we like dive more into it because I think that context could be helpful. Yeah, my um my programming background is um working initially with WordPress. That was like my first CMS in the space. So, a little bit of PHP familiarity there, but much more on the like tinkering UI side of things. And so the PHP would be like back in the Stack Overflow days figuring out stuff as I could.
And then um I've worked in professional web development for about 10 years give or take. I currently am more in a manager role now. So a lot of my coding's on the side. Uh but I've worked with a CMS called Craft CMS which runs Y under the hood and gotten a decent amount of experience with that. So again, not top level familiarity. And then I've followed the Laravel ecosystem for a long time. I've built a couple like super tinkery apps, but nothing production ready. So a lot of my Laravel knowledge is like high level. Like I know what it has and I know it's its patterns, but I don't I couldn't have coded something, you know, significant out of the gate um without some AI help.
So that's why I thought it would be kind of an interesting test is to I've got decent I think I'm a decent developer broad scope good really good on the front end is where a lot of my skills are good understanding of the back end but not specifically Laravel and that's where the the AI that I was using kind of bridged that gap whether it did it well or less than perfectly we'll see but um that's kind of what I was looking for I love it when you when you uh were writing this or having your orchestrating it within your agent, how much of the code were you reviewing?
Were you you said you were kind of looking at like overall architecture and everything like that? Were you actually looking at some like the snippets of code? Um or maybe like for names or things like that or was it more just you would you would prompt maybe you go into the UI test it that way making sure tests are passing whatever you're doing and then reprompt. Yeah. So two two answers to that. One is I started with creating the app myself. No AI help. So I used the like you know Laravel new installed the things that I needed to get NAP up and running first and then installed in Boost and any of to get all the help that I could.
So I essentially had a fresh clean no features Laravel install and then prompted from there. So I kind of knew that I was starting from like a de facto not broken good setup. I had it um created with inertia on the front end, inertia and view. Um, so I had like a good setup to work off of. And then, um, as I prompted it to go do the MVP and then add features, I was mostly reviewing, um, doing a quick quick review of the code, but looking for certain keywords that I either wanted to see or not see in there.
Looking for certain, you know, making sure, hey, if I prompt this feature, it's going to get a controller. It's going to get a change to the model and then it's going to get an updated view. Most of my testing has been on the front end and then I've very curs cursorally very high level reviewed the tests as well to make sure that the tests that it was spitting out were actually going to try to hold the features to continue working as I prompted and continue to build out new features or or edit things. That makes sense.
So I didn't feel like, you know, I mean it's it Gro Grock says it writes better code than me. It's probably true. I didn't feel like I had enough domain expertise right now to really critique it on certain patterns. So, I mean, I think if I dug into it more now, if someone said, "Hey, we want to fund your startup. Go get this right." First of all, I would get someone to help me uh nail down some of the fundamentals. But, um I would, you know, go through and look through and test all the patterns and look through especially the important logic around authentication and how all those things are happening.
but I didn't feel like I had enough uh info to critique it at this point. And it's done a really good job of building like functional features. And so that was kind of that's what I was shooting for in the MVP. Also, did you use the starter kit? Because I know you said you use Vue and Inertia. Did you use the Vue starter kit? Yeah, I believe so. I'd have to look back to see exactly where I started from, but I think it was the um Inertia View starter kit. And so I'm curious. Oh, go ahead, Leah.
Oh, sorry. I was just going to say and then you mentioned O. So I'm guessing you probably brought in Fortify to use O. It like prompts you when you're doing the starter kit. We'll have to see. We'll find out. Yeah. Yeah. And I made some changes to that as well, so we can look at that. But I wanted a purely SMSbased O. Um, so I tweaked certain things along the way. And I believe it is using Fortify under the hood. Um, but I picked a starter kit that would get me as close as possible from kind of out of the gate so I wouldn't have to I didn't want it making like the biggest picture architectural decisions because I wasn't sure how well it would do with that.
So, I tried to kind of get ahead by picking a great starter and then prompting from there. Um, and that's that's worked relatively well, I think. What's up, Chase? I'm curious of what you're using the Laravel SDK for. Um, and so with that, Jake, my my kind of like two questions. One, what uh additional uh maybe packages within Laravel, either first party or third party uh did you bring in or did AI bring in maybe like after it says like, hey, like you should probably do this. And then two, what were the parts that you manually did?
Um maybe like did you manually write Laravel new and start that or did you have the AI do all that? Did you manually set up your GitHub repo and and go into like Laravel cloud UI? What what parts did you manually prefer to take over or just because of knowledge wanted to take over and which parts did you leave up to the AI? No, it's a great question. Yeah, I um started it just like in a folder, no repo, chilling, you know, ju trying to lose all my work with accidentally deleting something. Um so I started it I ran Laravel new myself with some sort of starter kit.
I don't remember exactly what I grabbed at the beginning. Um so that was run by me. After that, um I think all of the other changes were were prompted. Um, I created the repo and I connected the repo to Laravel cloud myself, but I even had it I was like, "Hey, I'm going to deploy this on Laravel Cloud. What do I need to change or do or set up before I do that or as I do that?" And it kind of gave me the map to Laravel Cloud, which was super super simple from what I had running locally.
A few, you know, config changes and a few things like that. putting a couple um environment variables in Laravel cloud but it didn't it was like hey this is pretty much gonna work do this and this and you'll be good to go. So as far as manual things those are the only ones that I remember I did manual I did choose some packages specifically I knew I I knew about boost and that that would help me out of the gate. So that was the first thing I did. I got it up and running where I got like a, you know, localhost 8000 or 3000, whatever it is, screen up where I could see a Laravel logo and then I installed Boost.
That was the first thing I did and I told it um specifically I was going to be in cursor and I it read the rest of what I had going on in the project and asked me a couple questions and installed the MCP as well as a few other things. Um, so I think I have the full like AI kit set up and it's been very helpful. I I can see it talking back and forth. I can see it using the boost skills. Um, so I I think I got I tried to set up the best guard rails that I could out of the gate and I think that was a good decision.
Awesome. And this is kind of related to what Josh was asking, but Carl also asked, "Is it all Shad Cen or did you have it build the UI as well? Yeah. So, um, great question. Does the Laravel starter kit come with shad CN or is it a different kind of component kit? Yep, it does. I didn't even answer. Yeah, for react view. Yeah, I it was using the um the shad CN components. I ended up reply the like starter Laravel UI wasn't exactly where I wanted to take the UI. So I ended up having it kind of reinstall the default Shad CN components versus the kind of Laravel styled ones that come in the starter kit.
So I ended up removing most of the kind of built-in UI code. I think at some point I had it remove all of the views completely and start over on the views. Um but I may have like done the new ones and then have it like cross reference and back and back and forth to the new views. But the UI is essentially totally custom. Yeah, I love that. Another quick question for me uh on my end before we jump into the jump into some of the code is I'm curious what it what was the most um like either surprising or exciting thing about working with in the sense of like um you're you're building with AI.
You know what an app should look like. you've built apps before, but this was kind of like your first foray back into Laravel as well as doing, you know, something from completely scratch within AI. So, what was the thing that like most surprised you maybe of like, oh, like I did this and it nailed it in one shot. It wasn't wasn't that wasn't that bad. And then what was the most frustrating thing about maybe either just working with AI or like uh you're like, "Oh, I probably could have handwrote this front end part when it didn't mess up X, Y, or Z or those two things." Yeah.
Um, as far as the the most exciting or like most like I felt like I had superpowers moments were one just the Laravel ecosystem like being able to grab reverb and and I told it, hey, so there's a chat feature in the app and I was like, hey, I want to do chat. I want to have live updates. And it's like awesome. Laravel has reverb. Here's how you're going to configure it. Here's how we're going to run it locally. and the setup for that being AI knowing all of that and suggesting that to me. So, I knew it, but I didn't tell it use reverb.
I just said, "Let's have chat." And it said, "Awesome. Here's what you need. We're going to install this, this, this, and these ways." And um and so that the ecosystem plus the AI knowing about the ecosystem and what to leverage when really felt like a huge boost. Um, and then I think inertia getting me into a language I'm the most comfortable with with Vue on the front end and then tying that into um the back end in the right ways or hopefully some some right ways um what is a huge superpower as well. I think um I I know about Livewire and uh for someone who's pretty well-versed on the front end side of things with a lot of Vue and React experience, being able to bridge that gap really easily and write front-end code that's native to the way that I think, but that not put me so far from being able to interact with my backend that I'm always trying to figure out, you know, how many fetch calls am I making to connect this front end that I know how to write to these controllers and, you know, passing data back and forth.
Having a kind of like communication model in inertia feels like a cheat code. That's awesome. And also how it simplifies things. I know for me like even having that form component feels just like a huge unlock and then Pascal's been like cooking for what was it? Inertia V3 that came out like a two months ago or so. Yeah. And I think the amount of times that I was like, "Hey, build this feature." And instead of it writing like I said like fetch calls to hit a custom controller or you know starting to figure out its own way of doing things.
How often I saw you know because I'm seeing little code snippets pop up and little red and green sections as it refactors things to say oh I'm going to use use form from inertia or I'm going to use this like the way the firstparty packages work together. I think for a developer who knows the ecosystem they probably are doing that in their thinking. they go, "Oh, I need a form. I'm grabbing use form. I'm I need a form component. I'm grabbing the form component." So, for those things to exist, but then AI to also know how to use them.
And that seemed to be true much more often than not. I was rarely saying, "Hey, you don't know that Laravel has this, but it does. Stop doing it a dumb way." And I again, that's like the bridge of the knowledge I have, which is like I know what Laravel contains, but not as much how to implement it. So, um, I felt like I was kind of in a good spot to be building if the AI knew and I could tell it what I know and get it rolling, but I didn't end up having to give it a lot of the info that I feel like I had that equipped me to to set it up.
Got it. The most frustrating, and we'll see if there were maybe things I should have been frustrated by, but I didn't know to be. The most frustrating things were a couple like custom um UI type things I wanted to do. So there's a little navigation component and I wanted the you know it to have a line under the active item and then move between items. And um it had built the page where it was three separate views instead of like a nested layout. So even with inertia's you know route switching when you clicked between one route to the next route it was reloading not just the page but also that navigation section at the top because that was within the view.
And so even with I was trying to get it I was like use view transitions, use CSS, don't JavaScript this and it it didn't it couldn't figure out that the reason it was breaking was because the page was getting reloaded in the middle. So it would start to move and then it would jump and I didn't realize it at first and then I did and I was like I wonder if it'll fix this. And I ended up having to tell it like hey you need to refactor this to use a nested layout you know with with the right inertia features.
And I had to go look that up really quick and tell it. And then once I did, it was like, "You're right." You know, when it's like, "I got you. Yeah, you're right. I'll fix that." So, it was like apologetic. It's like, "Oh, I should have known that." But that was frustrating. And then even after that, I had to fix some of the UI code. So, every once in a while, I hit something that I do know how to do or know is possible that it can't seem to get right. And then I just get my hands dirty and get in there.
But that's a pretty small price to pay for for it doing the majority of things. And then I feel like I'm still the expert when I get to do one or two things that it can't get without me. So I knew it was going to be UI. Yeah. It kind of falls in line though, and I bet we'll see more of this in the code, too. more of what what I personally think and like what we've talked about on this on these streams before with others um as well as like even Taylor is like it it's it's coming down to this point I think where you're in a good position Jake of you know what's possible you're like oh this should be a persisted layout and so it's like you don't even really need to know the technical term of what maybe inertia calls it or you don't really need to know what is happening with props and this underlying layer.
It's more of like you need to understand the uh colloquialism for lack of a better word of saying hey this is what I'm trying to do. I know that Laravel and Inertia and Vue has persisted layouts or nested layouts, whatever this thing and that's almost half of the battle in a lot of ways of knowing what's possible so that you can tell it, hey, this is possible. Let's we'll find a way. Yeah. Yeah. And that that requires knowing what's and this is I I think why we're not going anywhere. Um is that requires knowing what's actually happening.
It requires knowing that rendering happens and how you know things get rendered and you know you could think about it in an islands architecture. You could think about it in a server side client side architecture and there's all these different like you said like concepts around it but at a deep way of understanding it. Someone who just vibecoded this with very little coding knowledge probably wouldn't be able to say like tell you exactly how routing works or how server side versus client side routing works. And so um you know if you do know those things I think it levels up your ability to produce because you can understand what's happening a lot faster than someone who just keeps prompting make the line move smoothly.
you know, like that's not sometimes that's not enough knowledge to get where you need to be. Yep. Yep. Or even be able to tell it the optimal way to do it because I feel like sometimes, especially in like front-end stuff, I have to say like, "No, we should actually be doing it this way." Like sometimes it would try to do stuff like in just JavaScript and it's like, "No, you can do natively in CSS. Go to my CSS file, add it here, use these specific things in CSS." And like if you don't know how to code it be Yeah.
Well, you you wouldn't really be able to do that. You know, you just have to take what you get. I do feel like that's still a gap with um I don't know if some models are better than other. I've heard that I've heard that there is a discrepancy, but that is where I've found the most um that I still need to use my knowledge of actually implementation and what's out there and what's available and what's the best way to do things. thinking in you know like amount of code performance what things need to be involved to get something done is on the especially CSS but just generally on the front end side of saying like I think it's because there's so many ways to do things um it maybe doesn't when there's 10 different ways to do it maybe doesn't always pick the best route with all thinking through all of the concerns involved um so yeah yeah I want to do last uh kind of like bets maybe or uh if that if that's a good word but anyone in the chat I'm curious what is like the one or two thing that you know we will find I know Carl had mentioned at some point of like probably like a bunch of statements um my mind ones that I just because I've done a lot of scaffolding out from scratch to nothing the ones I I think is um it's going to uh probably have specifically within inertia.
I'm guessing it's going to probably have more um either like axios or fetch request within like a use effect than it probably should and it probably should have used something like even like the new inertia use HTTP instead of that which is a nicer wrapper. And I also think if you have any cues, it's probably going to either uh uh and Carl also mentioned with the lots of breaks to cruddy by design. I I definitely agree with that. AI hates the CRUD controllers. I don't know what's best with controllers. Honestly, I don't write controllers as much within LiveWire.
Um but my second one I think is within Q's or any kind of reverb stuff that you had mentioned as well. I'm guessing it's going to default it to cues versus like should broadcast now for notifications and doesn't delineate based off of what the actual outcome should be. I think I actually had to fix that. So, we'll see if that if that's tweaked somewhere. Um, but I don't remember the UI experience that I was having that was not working correctly. But I the should broadcast now when you said that I was like I've heard that but what would the behavioral difference be?
Yeah. So within reverbs the there should broadcast now which is happening on that request. So instead of saying like let's say for chat messages um especially if you're only having certain number of connections within a certain time. A lot of times that's just better because it's not pushing it to a queue and and having to go through all that process. Um, and then the default within without should broadcast now is pushing it to a Q. So every broadcast within uh reverb within echo is by default to a Q. Yeah. Okay, cool. Yeah, I'm pretty sure I ended up tweaking that, but you're right.
It did set it up in the opposite way. And we can check the code for for verification on that. Yep. I think Raphael has a good guess too of like probably pretty bloated controllers and duplicated functions because I always see duplicated functions. They'll like rewrite something like a one controller that's like in a model or like somewhere else. It's like no, we don't need that. Um I also would guess a lot of comments and a lot of unnecessary comments. Um, and then kind of like on the vein of what Josh was saying with inertia, I feel like AI loves to use like um, use form and like kind of outdated ways to do things instead of using like the new form component or like like he was saying the new you what use HTTP hook like it kind of defaults to the older way of doing things instead of the newer and sometimes you have to like handhold it.
Even though boost does feed in that context, it still likes to go a little rogue. This is where Oh, so go ahead J. Now on the front end, so you talking about the duplicative functions I did the other day, I refactored something on the front end so that all of my like in a in a form uh so that all the like submit buttons will show a loading indicator when it's submitting so they get some sort of feedback as you know I slowed down the network. It was too fast so I had to slow down the network so I could see it and it appears inline on the button and you can't click it.
So I had it do all of that and then I had it apply it everywhere and it essentially just like duplicated a lot of the same functionality because there's some you know uh client side state which needs to be managed for that and some like the SVG that it's using for the loading spinner and it would just like duplicated and I was like hey instead of doing that make a you know submittable button or something like that component and then reuse that. So, it doesn't always sometimes you'll see it reuse something. You're like, "Wow, that was great." Uh, but I I had to specifically prompt it to not go throw a bunch of the exact same code, implementation code on 50 different buttons.
And I'm like, "Okay, if I ask you to go do something everywhere and we just did a version of it and you're copy pasting 50 times, I don't know if I need to put this in a skill or something, but like probably that's a good time to refactor." So, I don't know if you can teach AI like the rules of three or whatever. You know, a good metric for that is like, hey, once you've done the same thing three times, if it makes sense to refactor, refactor. maybe there's a skill for that. Probably. Or similarly along along those lines, I I I did want to do a a shout out to I I posted a short um yesterday I think fits really well with this.
uh I'll put it in the the comments, but it's uh it's essentially uh where I think when you were building with AI, and I'm curious, Jake, as we look into the code of like what AI started to do, but the better tooling becomes when we have things like uh linting on the front end or or tests and types and it's it's one of those things where especially like uh there's there's recctor within PHP and Laravel that uh kind of catches maybe some of that outdated PHP code. And yes, it doesn't really matter in terms of functionality, but it does matter later down the line when you're having all this architectural opinions, if you will.
Why don't we jump into the code? I guess we can jump. Yeah, I did have one question about the cursor stuff, but I think we should jump into the code and I can just ask it. Okay, awesome. Oh, yeah. I have not used cursor in a bit. So I I'm curious to hear how that all flowed together if you will because there's also different views like you can do just the agent view for cursor where um you're basically talking to it like you would claw desktop. So I was kind of curious if you used that kind of view where you used it more like a chat interface or you used where like you had the actual like IDE looking at the code on the left and like on the right you had the chat.
Yeah, I started off in like a full IDE setup and then when they when they demoed the new setup it was called cursor glass and um I tried it out and I was not happy because I was like where did my code go? Where did my, you know, my uh uh file viewer go? I'm like, I don't want chat GPT looking view or a claude looking like, you know, just a chat box as as my setup. And um I think they've refined it a little bit in cursor 3 where it blends really well. Um so we can look at that kind of as we go.
But I've got over here, you can see all my recent chats and all the different features I've worked on. I think it's really cool to easily be able to switch between these and jump right back in. But then if you hide that, you can kind of go into the standard IDE setup where you can see your your file tree if you still need it. You can see be chatting with one agent specifically and then, you know, have code out here in the middle if you need to be looking at things specifically. This is kind of where I've landed for now.
I love it. Uh I think the less reviewing you're doing, the more the just kind of like straight up prompting, orchestrating. uh you know, you feel like a project manager more than more than a programmer at that point. But um the less code review you're doing, the more that makes sense. Yeah. I'm curious then when did you start this? Like I saw 30 days ago. Um so when did you start this and how roughly how much hours of of prompting and back and forth do you think it it has been so far? That's a good question.
And uh so my I tweeted creating the project on March 16th. Um so you know 45 days ago something like that under two months and I was too like an MVP a while ago. I've added some features since and I've had some trouble getting it launched because one of the main functionalities is inviting users via SMS and I'm just back and forth fighting Twilio to get a phone number because they're not happy about the way I want to invite people but we're going to get there. Um still getting that 10 DLC approval. Um but um it is it is up and live.
I got it up on Laraveo Cloud for like uh internal testing and um I probably have sub 30 hours in at this point over the past uh month and a half, something like that. That's relatively good though. it's on the smaller side. It could be in that like 20 hour range. It's definitely like a an hour or two in the evening when I get a free free chunk of time, not a full-time thing. So, yeah. Uh the first thing I want to look at is in that cursor page. Is there any custom like uh in the cursor uh directory I should say that not cursor directory.
Is there any custom skills that you either had to add or it doesn't look like it but was there anything that you're like hey you've gotten this wrong too many times. Make sure never to do it again. Yeah. The only one that I added is this UI development skill. Um, this is pulled over from a project that I was working on that wasn't in Laravel and then I just customized it for this. So, I gave it some things like the golden rule of UI designs a min minimalist design with fun character because I wanted this app to have a fun feel but not to have like a super bloated or big look.
And then I added some of these things as I went throughout like um when working with Shad CM view components sometimes it would make really wrong assumptions about the underlying APIs and how to use those components and Shad CNN under the hood for the version I'm using uses RA UI. So I just told it directly like hey go read the that UI's API reference versus guessing at things because it was making some really stupid guesses. So, there's some good good um little tweaks in here. Um and then the rest is really like domain specific like I wanted.
Whenever you make a layout, it kept either having a gutter or not having a gutter or wasn't very consistent. So, I nailed a few things down like that. Yeah, that you bring along another point that I think it it's helpful and the more you as a developer grow and you have these sort of opinions, I think it's helpful for AI to look at past things that have done whether that's like past skills that you're bringing over or I have a lot of success. Usually I'll be like, hey, I did this in like a project two months ago.
Here's the here's the directory. here is literally like how this is working and it's working fine in this other thing. Just copy that but apply it to this like because there's so much stuff that we we don't need to reinvent the wheel especially if we know how it's already done. Or how we want it done. I tweeted about this a little bit ago. It's something I learned pre this project but have stuck to on this project. If if I'm prompting and it implements something incorrectly, whether it's the underlying code or, you know, UX or UI pattern that I don't like, instead of fixing it and moving on, either with code or just prompting it to fix it, I will update some sort of skill or some sort of knowledge base and then say, "Hey, read this and revise it." Because then I know next time, you know, I needed to make a button or I needed to make a new page.
next time I make that page, I don't want to be doing the same thing over again. So, I almost treat it like I'm teaching the AI or the the model as I go. And I don't really want to be teaching it the same lessons multiple times. So, that's really what I've used skills for the most. And I think have done really well is um is trying to correct those things once and then if it does it wrong the next time, then you know, I know that um I can maybe update that or I need to solve some underlying problem.
But I'll try to not tell it how to do it or fix it directly. I'll say, "Hey, I'll go update a skill. I'll say, "Hey, read the skill and correct this yourself so that I could get it right on the first one." And then I have a relatively high level of confidence and can do it right the next time. And that's I think saved me a lot of time um not making the same fixes repeatedly. Great. That's a great workflow to have too is like that way you're not always having to say the same things.
You're documenting like what you run into. Yeah. And you're putting it in a skills a skills file. So are you manually uh updating that skill or is that something that you're you're still prompting to update it in this certain way and then you're telling it to check it again? I feel like writing skills uh maybe the AI writes them better than I do because it knows exactly what it wants. So I think the form submissions and data operations is a really good example. I definitely had it write this itself and it put some code in here specifically for it.
I told it, hey, next time you do this, do it in this way and now go update this skill. the like general rules that you'll see here about like the state transitions, the the layout, the big picture. I wrote that myself and I want to keep writing it myself. Um, I like, you know, forcing myself to tr truly think through what I want before I get the AI involved. So, it's not just like, hey, go write a skill telling the UI to be better, you know, like I think I want to define what that is.
And I think it's helped me get good results. Is because I'm still putting in the effort to define what the standard is and use my experience as well as what I know about UI and UX to do it the right way. Yeah. because you're still being opinionated. Like you're not just accepting whatever AI gives you. You're being opinionated of how it looks, which I feel like is kind of key to getting the quality of code that you want. Yeah, I like that. I'm curious, but I know we're already kind of looking into it. I'm curious what the use delayed form is because I'm curious where and this is more of like I'm just for anyone listening within inertia like Pascal or or Joe Tannon who may might be listening to this or I can pass it on.
Why delayed form? Was there something in Inertia that didn't work the way you wanted to? Yeah. So I believe that was a part of this like recent refactor that I was talking about and um I could and I don't know if the implementation of this is great but essentially what I wanted to happen is that um when you submit a form whether it submits in 0 milliseconds or 1,000 milliseconds you see a loading spinner on the submit button for at least 300 milliseconds because um something I've learned is like if it shows for you 100 milliseconds or 50 milliseconds.
It actually feels it looks and feels annoying because you almost didn't need that. So, I'm I'm delaying the UI slightly. It might, you know, save and be able to move me to that next screen or whatever the postsubmit action is faster than this. But regardless, I want to see that little spinner for just a second so that the user feels like, oh, something's happening and then it moves to the next thing. So, um it wrapped, I believe, the uh form Yeah, it wrapped up some of the inertia functionality for use form into this composable. Uh, but I essentially told it, hey, anytime you're creating a form that creates something, I want you to either delay it or delay it if necessary um to show that spinner for at least 300 milliseconds.
So, that was like a UI decision and the inertia version wasn't wrong. maybe it has this built in and and I didn't catch that and AI didn't catch that but uh that was like a UI UX decision made on top of the like built-in functionality and I do see it using use form which I don't know if like you're having to like bake this much out if you would want to use use form instead of the form component I feel like you could use the form component and still do this but AI loves use form I will have to like handhold it to be like please use the form component Sometimes I have to like manually do it because it will default to use form.
Yeah. No, that that makes sense. I don't I don't know. I'll have to I'll have to double check with uh with some of the inertia team, but I don't I don't think this is possible. This is probably the right way to do it in that sense of like wrapping it all and yeah, not like always having a delay of at least 300 milliseconds got right. Yeah, that makes sense. Also, Carl was asking if we could open the app folder. Let's do that next. He's probably trying to steal my keys or something. We're on to you, Carl.
Okay, so Carl, surprisingly not. I mean, I I I I have to double check of what the like default is within Laravel now. Um, but I think it is this. Let me open a project. It is. Um, yeah, I think we're pretty much the same. I think like services is the only one that is fine. Um, yeah, like that that's that's typical standard. Uh, yeah. So, I think this is actually fairly good. Let's look at uh Okay, event. So, mesh is sent. What's in HTTP? This is where we can get into where everyone pretty much guessed that controllers are going to be super meshes.
Let's Let's look at those. Okay. Okay. Where do you want to go first? Group controller, group member controller, invitation. That sounds like a lot of controllers, right? I I would think so. So like I think there's like two realm of thoughts typically and people can die on both hills. I think of like people either choose to go very cruddy by design. I think you have you you don't change the names and it's always postput patch update whatever the seven are um or people go usually there seems to be no middle ground. AI loves the middle ground I think of doing like these custom named methods.
I prefer like invocable controllers like like single action controllers. CRUD is lost as Chip. Hi Chip, by the way. CRUD is law that CRUD train for sure. Yeah, CRUD. CRURD train. I I personally prefer action like what what is a little bit newer method would be like single invocable controllers. So like anytime something does something instead of having a bunch of controllers, you have actions for uh profile and it's like delete profile and that is its own class its own file. I'm guessing I guess you're cruddy. I don't I think I'm cruddy. Yeah, that's my live wire speaking though, too.
I just like one I like knowing this is the one thing it does. That's right. That's right. Do away. I kind of don't like that. I don't I now I want to test it, but when I think of it, I'm like that's a lot of files. Like I mostly like I can't take full actual. I think LiveWire is part of the reason why I like it. And then um look uh like a lot of Nuno Maduro's stuff got a hold of me of like oh like let me just think about it in this way. Um and then uh the cloud got a hold of you is so funny.
I just imagine like just grabbing you by your he's like use actions only actions. Um but yeah uh let's look at uh so uh one of the things I I just looked at the commit messages and it says install breeze but breeze is an old version of authentication. So I'm curious what that did within within O. So that's looking and breeze is from what? Laravel 11. And I'm guessing you use Laravel 13 for this. I think I think this is on 12. I'm pretty sure that I started it before 13 or at least when the installer was creating um on 12.
Yeah. Composer. Yeah, you were right around there because you said March something. 12. Yeah, I think we're rocking 12. Okay, we got reverb. We got them. I see Laravel framework 12.0. Fairly minimal app. That's good. I like that. Try to keep the packages just to what was needed. There you go. There is little little bit of sh There is a Laravel boost skill to update to Laravel 13. I did see that. Yeah, I haven't gotten around to it yet, but I think that would be sick. And to update Inertia V2 to V3. Did you say you were on Inertia V3 though?
No, I think it's V2. Where is that in the pack? Yeah, inertia. Inertia. I think it's in. You see it? Okay. Yeah, I see it. 2.0. Yeah. So, there's also a skill for that. And then you could refactor some of like Axio or fetch request to use to use the use HTTPS hook that Josh mentioned earlier. Yeah. And there's view transitions already built in to um Inertia V3 as well. Yeah. Yeah. Sweet. Raphael. So Breeze did sneak into there. Breeze did sneak into I wonder if I loves Breeze. I don't know. Yeah, that's that's that's interesting.
Breeze 2.4. Let's see if it shows up in my um prompt log to see why. Nope, not that. Yeah, because I wonder if you almost explicitly asked it because I know some people do like want to use Breeze still and like that's a a choice they make, but it'd be interesting if AI was just like, "No, you're using Breeze today." Like, we're bringing it. I feel like I should try to find the like wherever the starter kit or whatever I used to start from because I feel like that was um a part of it. I also I also wonder if um I think I might have tweeted about it too.
So I'll try to go back and find it at some point. The only interesting thing too is like if you Laravel nude, which you said you Laravel nude yourself and you're using Laravel version 12. So the Laravel installer doesn't mention Breeze for 12. It didn't. It mentioned like the React view starter kits. So I'm guessing this was an AI thing. Yeah. possible probably when you're like and and that's that's one of the things I think is is interesting and one of the things I think we are always conscious of of of how can we make sure names are possible in the sense of like okay AI you don't need breeze you need sanctum or you need right uh socialite if you're doing SMS um let's look into that off controller then I'm curious also sorry to distract chip is This is Jet Brains Air.
This is Cursor, right? Yeah, it's in Cursor. This is Cursor Chip. I'm rocking a dark theme so I don't get hate because I'm normally rocking a light theme, but I'm just not trying to get hated on today. Okay, Josh light. I'm pro even though all of my idees are dark, but like if I'm doing codecs, for example, like a codeex app, uh that's light mode. I like it in light mode. Yeah, I'm normally Let's see. I'm gonna I'm gonna pop over everyone. I think I'm I think I'm normally Let me close my eyes. Light modern something like this.
See that? It's just It's just better. That's not bad. I like the yellow light modes. I honestly have slack in light mode now, which is surprising for me. Yeah, I do too. I do not have slack in I've never had Slack. Twitter's in light mode. Wait, Twitter's horrible in dark mode. Feels like you need jail. It's It's only okay in dark mode. See, this is what I'm talking about. This is the hate that I can't You can't tell me. I'm sorry. I'll dial it back. Twitter is wonderful in light mode. All right. Where do you want me to go in here?
Okay. So, yeah, that is so all of those for um off. Yeah. So, I think like for example in the new starter because I'll have to pull open one that's not um Laravel. I think we only have a verify email controller controller. Yeah, I'll I'll Laravel new a new one while we're doing this. There you go. Um let's look at uh the uh confirmable password controller. Curious this is Breeze or not? No. Yeah, I'm I'm I don't know off the top of my head which ones are there. Um, let's look at the uh So, all that looks all that looks good.
It's doing the right things. It's doing things. It's confirming. Hey, Mommy. How are you doing? Uh, let's look at the authenticated session controller. Okay. So, so this is a login view. So, some of this Yeah. Doesn't look like Fortify is actually installed. Sorry, I clicked stuff. Oh, it doesn't. Uh, can can you go back to like your composer JSON? I'm curious of like if it's Yeah. So, I'm guessing if I had to guess of what um what the AI was doing is like, oh, it needs Fortify, so let me install Breeze so that I can get Oh, fortify through that.
And Lawrence said those are all Breeze default controllers pretty much. There you go, Lawrence. I have not been in Breeze feels like 20 years ago, even though I know in AI world three months is a year. like dog ears. I started with Breeze and I loved Breeze and there's so many like streams where on my personal channel where I was talking about Breeze and now I can't remember like anything about Breeze. It's been it's been a while. Now I have my own like my per opinionated starter kit. So I sometimes I I have to like remember which one have I stripped out for the from the original starter kits as well.
I remember I just looked this up. I remember landing on a page that talked about Breeze and Jetream. And I'm looking at it looks like it's from the 10 10 docs. I don't know if it maybe was on 11 like that, too. Um, it definitely wasn't on 12. So, that's probably just a Jake error, but I remember being on that page because there's breeze and it talks about how to use it with React and View, how to use it with all these different things. And then there was like just a really a short excerpt on Jetream as well.
And I was like, well, it seems like it seemed without the Laravel knowledge like Breeze was the thing. And that was probably just some wrong documentation. I either got pointed to by Claude or a quick Google and I probably just said, "Hey, use Breeze." I wonder if um I wonder if the skills have then because Breeze was installed if it was like, "Hey, you should be using Breeze stuff." And that's what you know that it's been pushing it towards as well. I don't see anything in here that would have been recommending. I see those controllers under if you just start a new app with Fortify and like view.
I see like there's under app there's like actionfortify and then you have like create new user.php and reset user password under that. I don't otherwise I don't see all of those. I do have an old uh breeze app that I'm curious if those are the default controllers then. Hold. I was about to dig in my GitHub for one. Um, this might this might not actually be breeze. Let's look at um uh so I'm curious what did you do what did you know about testing specifically within Laravel but I guess yeah overall too and what were your any preferences that you pushed into the app through testing zilch on both fronts.
So I mean within Laravel I know very little about testing. Um I think it asked me at some point whether to use one testing framework or another and I chose one I believe and then from there I just let it let it run. I have not at any point told it hey write tests in this way. I have seen where it will make a change and then it will rerun the test and it does that pretty much every time. Um, and when the tests fail, it will it'll realize its mistakes and fix it. So, they have seemed to be working to keep the things that it writes tests for at least from not breaking.
Whether those tests are correct or not, again, I haven't done a lot of validation of. So, my testing knowledge within Laravel is at pretty much zero. So, I had zero opinions on that. That's definitely been the category that I have not reviewed, I haven't touched, I didn't give it any specific direction for. I like that. Do you know which testing one you chose? Cuz I'm guessing it asked between pest and PHP unit. Yeah, it looks like test. Yeah. Okay. Yeah. And and again, that's this is probably not the best re way to be making tech choices, but for a demo dummy app that's for fun.
I had just seen past around in the community and I thought that that may have been maybe the uh preferred path at this point. And um so that's what I went with. Yep. Does that sound fair? No, that sounds fair. I think that's our the default option as well, too. So it's like one of those things if you don't touch anything, you just press enter enter. For sure. It's going to use and I've used is PHPUnit the alternative. Yeah. And PHPUnit is just class-based testing where test would be more of like the functional test kind.
For sure. Yeah. And I've I have some PHP unit experience just a little bit and it wasn't my favorite. So that was the other reason I'm like, "Yeah, let's let's try something new." Let's see. Let's see some of the feature tests. I'm curious. Okay, so we got some uh let's do the uh the maybe the invitation test. That sounds good. One of the things that I have seen testing get uh uh get better of course but one of the things I've seen that AI kind of lack a little bit when it comes to tests is not utilizing seated information or like re like refreshing the database when it shouldn't like those kind of things.
Um or wiping a database. My god, it loves to do that. It's like, oh, it will like completely refresh and drop stuff. Sorry. I I like I like some of this stuff, though. Don't ask me how I know about the database stuff. Yeah, I mean, there's stuff in here that is created specifically based on features that I prompted. So, you know, when when creating a user, it should be normalizing to a 10digit US phone. Sorry if you're not in the US. I'm working on this from the US for now. So, that's what the tests are reflecting.
That is the functionality of the app right now. So, it did that and it's tested against that. That actually broke at some point and then got fixed. So I think that even without um a lot of work on the test I think that they have helped the AI to catch it essentially going back on things that it maybe should remember but because you don't have an unlimited project context and it's not going to read the whole project every time it goes to work on a feature. I think that the test that it's written has helped it from shooting itself in the foot by going to do something and messing up something that it's done previously.
So yeah, the type of thing you would know if you were writing this feature is like, oh, when I write this, that's going to mess this up now. I need to go kind of rectify that. It doesn't do that as well as as I would. Um, just I probably just because of the context. Um, so you can do that and say, hey, when you go to work on this, don't break this or or adjust in this way. But if you don't, I feel like the tests do play a pretty good baseline role of keeping it from breaking itself.
Yeah. Um, I feel like these look pretty good. Like these tests look pretty normal. They don't look like not too weird, not broken. No. Yeah. Cuz I think sometimes that it might especially, you know, before maybe maybe like Opus 4.5. Before that, it was definitely more of like these, oh, we're testing for something that's not it like that that that's not going to save you if anything breaks anyways. It's like, oh, we're testing for like this particular thing. But I think it's gotten like models have gotten better within that understanding kind of like what you mentioned, Jake, of like of, oh, hey, this is maybe it's not testing for like the specific feature, but it is testing so that this is the standard functionality.
If something changes in this code, this is probably going to break if we don't retest it. Yeah. And like kind of what Josh was saying too when I noticed whenever I was trying to add more tests sometimes AI likes to just add a bunch of tests and then you're like hey you're testing something that like we're not even going to run into like it's not possible to for this test to ever fail. Like why are we testing for this? I don't really see I mean without knowing more context of the app I don't see any tests like that here.
All these tests seem like actual valid tests. Yeah. Now, as I'm seeing these, I mean, these are based on the functionality of the application. So, if a user accepts an invite, that pending invitation or if you invite someone who's already a member, it won't create a new account. It'll, you know, accept the invitation to that team. Um, instead of, you know, creating a new account, the tests seem to line up with how the app should work. So I'm curious if you open up the a terminal and rerun PHP artisan test. How many how many tests are there?
All right, let's do it. What what are I thought you wanted to check if any fail. Yeah, PH Well, that too, I guess. PHP artisan test because I I have seen AI be like h we only have like 80 passing, but that's good enough for now. Okay, there you go. 125 all pass tests with 404 that are passing test, baby. That's pretty good. See, I I love that I got into Laravel and also just became a better developer at the right time because I have not written any single test by hand. Yeah, for sure. And it's amazing.
And I I've gotten I've written a lot of tests now or AI has written a lot of test. Yeah, that's great. I do feel like that's a pretty So I It's hard to know because I'm a noob to Laravel specifically what has helped the process. Um, but from my perspective, from how often I've seen the tests get called and either be successful and then the feature is successful or get called, fail and then it either adjust the test because I adjusted the feature or you know fix the thing that was breaking the test um has been really helpful and I haven't seen it which because I was looking out for this I haven't seen it say this test is failing let me adjust the test when it should have fixed the functionality.
So, it may it's possible that may have happened, but I I've been pretty careful to keep an eye on that. And it has almost always said, "Oh, test has failed. What do I need to fix? Is it the test because the user asked me to change something or is it the function or is it the functionality because it's not working correctly and it's made a good call all the times that I've checked?" No, I'm happy. I'm also a little curious. Did you tell it to write test or this is something like when you were doing the plan mode, it just automatically like decided it was going to write test for the features?
Yeah, no prompting. I I'm never prompting to write a test. So, um my guess is it's pulling from either boost or it just is is because of the project setup it's writing tests. But almost always when I prompt it to add a feature, it adds the feature, it gets working and then it says now writing tests and it doesn't. And I've never once said, "Hey, create this feature and then when it's working, write tests for it." Or a TDD style flow where I say, "Here's the functionality. Go write tests and then implement." So I think it's doing it in the the non-TD style for sure because I haven't seen it do tests upfront.
Um, so I could probably prompt for that if I cared, but um I haven't I haven't given it literally any testing um like input. I'm curious and anyone in the in the comments um or uh in the in the chat I'm curious if anyone is doing TDD within uh AI. I personally have not and it seems like more people are in the realm of uh I think within the testing skill within light boost. I think we do kind of recommend doing it the other way around of like test tests at the end after the feature has been reduced.
But I'm curious if like there have been people who have found a lot of success within TDD within AI. I think this is one of those benefits of having a full stack batteries included opinionated framework where you know it it's it's you're building this thing that you're that you're creating and because testing is part of the framework and because all those things are aligned it's like oh I know that now if something breaks or if the test fails I need to change something and not the other way around kind of thing. Yeah, I do think some people do TDD, but I think so I Kristoff I think has a video on this.
I've seen some other people mention it. Like I don't know if it was Nuno or who, but I think those that are doing TDD are write handwriting the test first and then having AI generate the code based on the test. So then they're they're like being opinionated, handwriting the test, not having AI generate it, and then having AI generate the code based on that. Yep. I mean I also haven't uh for what I have and haven't done I haven't ever told it to run the tests and at no point was I like hey when you create features run the test.
So uh obviously the the skills and the initial setup are doing their job because the the tests are getting run at least when features that are developed that should you know be um either retested or that suite should get ran. So um I'm never running it to check it. I this is the first time I've run it myself except in the the deployment pipeline. So um good to see that they're passing and AI hasn't been lying to me the whole time. Yeah know they look good. And then Durk said when using AI and in new AI projects I ask it for 100% coverage and it's in the rules.
Yeah. And then having it run against test, recctor, PHP, span, pent or pint would max strictness and 100% on all of those at least ensures the AI slop is 100% nice AI slop. Exactly. Yeah, I love that. Reasonable. Did we dive into the other controllers that weren't just the O ones? We haven't looked too much into those yet. I'm curious of of those and then um and then like the events and broadcasting cues, those kind of things. Um HTTP controllers maybe like look at message controller. That seems like that's probably one that is likely. Yeah, broadcasting.
Okay now. There you go. Store. Yeah. So, this would probably be one where it's like it it was trying to do cruddy by design, but it should have just been like an invocable controller um of like, hey, store message request as an action or as like as a single single controller because that's the only thing in here. I would much rather prefer I'm curious if you guys do. I would much rather prefer though fewer and more files than one file with 30 uh public functions or something like I kind of like them all together, but I can agree with you that if this is the only thing in controller, maybe just have it invocable.
Like I can agree with that. If if you had like 14 different methods in this controller, I would not agree on making them all their invocable actions or whatever. Yeah, I tend to lean a little bit more, you know, without the specific nar Laravel knowledge. I tend to lean a little bit more of like grouping things together into one place. Um, I don't know if that comes from my like view single file component brain where it just makes sense to put things together and have all of the logic in one place for it to be kind of easily scannable to me like what's in here.
I you know I can collapse this and be like okay within messages we can store we can xyz um that works in my brain but I also get how you can you know pop open your file explorer and see that at a glance here as well if they're kind of named in that way. So that's some of the types of things I would have argued pretty hard, you know, in the past too. And now it's like based on the like technical, you know, like, hey, is this going to cause an issue or not? And then if not, give it a skill with your preference and move on, you know, let's not bike shed What's the group controller?
cuz this is one where it's like there's a lot of there there there's not as much names as you would have thought or or even there's no directories in those controllers to to group them. Even the display a listing of the resource I feel like that doesn't really explain what it's doing. So these definitely feel like AI comments to me. I think I could be wrong but I think those might be the um like if you run a full resource controller Mhm. artisan command. I think these are Does it generate those? Oh, okay. Like a display a listing.
That's like the CRUD. Yeah, let me let me check right now. I don't think I ever ran. Pretty sure that's correct. PHP artisan make controller. I'm going to call this uh group controller just so I can see. And it's going to be a resource controller. Um, yes. So, those are So, I would guess that this is like the all of them. Yep. All of them. So, all all seven. The index, create, store, show, edit, update, destroy. Yeah. And there's a few other ones sprinkled in. It did add some more. Edit, update, destroy. Which ones did it add?
Show events. These are for um like pages that are like subpages of of this group. So you've got like an inertia view up here. This is part of that refactor that I was talking about. You've got your like main inertia view for groups index and then within that you've got these controllers which are being I think they're rendering inertia as well. Yeah, they're like sub subpages. That's it's funny. It's probably it like it made it all seven crud and then like during the rehacker it's like uh instead of creating new controller I'll just throw this in there on there.
What would where would those go if they weren't in here? Would it be like a like group route controller or like where would those normally get refactored out to individual controllers per route? Yeah. See, this is one where I my preferences do not fall into the line of most people, but I would probably if if I was most people, I would say like it would probably be then a group people controller. So then that'd be looks like like a list. you know, like a a show I should should say instead of instead of um or like an index would be the show people.
Yeah. and show person would be the show because that's displaying right specific one, So I I think those would be like if you were wanting to keep it like the cruddy by design, it's like okay that just becomes its own at group people controller. So said group people controller have it resourceful as well. So like what Josh was saying um with doing like the PHP artisan command to make a resource to be consistent. Josh, how would you personally do it if you were not most people? If I was not most people um either and if I was using inertia either I wouldn't uh I I would probably do it all as invocable actions.
So it would be like um one directory of like HTTP um actions and then it would be like the show person controller and it would be the list person controller and so it's like grouping them into and I'll probably put them into like then like a person directory too to make it a little bit more cleaner. I like ve very I prefer a lot of directories if that makes sense. Yeah, it like kind of mirrors the architecture of the app or your like data model at that point. makes sense. But it is I I am uh I'm glad that AI is moving more towards instead of it having like this show purse and everything like that.
It defaulted to like the cruddy aspect because it probably ran the PHP artisan command and it's like okay this is what it's giving me. Let me fit into this instead of trying to make its own brain. And then it just added a little flare. It's like, but let's let's just deviate a little bit from Crud. But it did like it started off really strong. And I honestly I also don't feel like this is like an awful controller. Like it feels pretty fine. Like obviously you do have crud at and then it's like let's add some sparkle and it went off of that.
But it's not like doing completely rogue stuff. Yeah. Exactly. someone's going to package a skill with like uh with their, you know, very specific preferences for how all that stuff gets built. And that's something I might, you know, as I like learn and iterate on this as well, too. I might have write a skill and then have it refactor to that um you know, install Josh's Josh's skill for the way he would structure it and then have it refactor that setup. That would be pretty interesting. See how that goes. Josh is probably working on it as we talk.
You just see him like piping making this invocable action skill. Do you have something like that, Josh? Or would you tell it like, "Hey, when you create this, go do it in this way." But like when you're vibe coding or agentic engineering, are you are you giving it that info so it does it how you want it? Or do you have some sort of skill you're pre-writing and pulling between projects? Yeah. If this is a if this is likely a project that I'm that I'm spending more than just, hey, this is a demo I'm putting together.
I'm spending more time on it. I probably start from either I'm using my own preferential starter starting point which has skills of okay anytime we are doing something that needs to be abstracted from a live wire controller or live wire uh act method for example then we're going to run the PHP artisan make action which is a separate package within inertia I typically uh e in the um like I either install so like for example Nuno Maduro has some uh uh what was called like this essentials package which has a little bit more of those stricter opinions.
Not just for testing but with recctor um it has uh preference for invocable controllers and actions. So I probably would if if not at the very like initial prompt or in like the agents.mmd I would probably like say this is my this is my preference. If I now if I if I if I see it doing a little bit different than that, I probably wouldn't directly fix it until I get to like the refactoring stage. Yeah. Yeah, makes sense. Someone was looking for an idea earlier. If you want an idea, you could make a little like skill generator that asks like top 10, you know, preference questions and then spits out a skill into your project that you could like run Laravel, run this, and then it, you know, use that for like your best practices.
Be kind of cool. I also wonder if you could build something like that and then like you connected it to your GitHub account and you like chose certain repositories to train it off of. Yeah. Yeah, just like look at these projects and then you're like create a skill based on like how I write my code. Yeah, that's a good idea. It's really cool. It is a very neat idea. I do like that. You might have to bring it to the internal Slack too because like uh I think I think it's nice to be able to not force people but maybe push nudge people into having their own opinions when you're working with AI.
And so it's like one of those things like oh do you do you like um you know it could be front end stuff or or or backend stuff like you like working with notifications versus mailables and like all these things it doesn't really matter but it does if you're writing it kind of thing. Even for like the way you know everyone gets the same Laravel starter screen spit out and whatever. If you said mentioned front end, if you had a couple config options that got put into the shad CN config where they pick their theme or they get to pick like whimsy versus minimal versus, you know, whatever the different things are.
It could also make it feel like your project even from Laravel new so that when you get it, you've picked a few things like, oh, this isn't just the Laravel, this is my Laravel. I also like you know how a lot of vibecoded apps are looking the same. I wonder if you do something like that and you're like you spend a good amount of time on like a skill or whatever that's like telling it specific ways to do things so it's not just defaulting to the way AI would do it. If that…
Transcript truncated. Watch the full video for the complete content.
More from Laravel
Get daily recaps from
Laravel
AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.









