🔴 Laravel AI Best Practices, Inertia v3 Stable, PHP Foundation, Terminal Stuff
Chapters10
The host welcomes viewers, sets the agenda for the live stream, and previews topics to cover.
Nuño Maduro dives into Laravel AI best practices, Inertia v3, PHP Foundation news, and fresh Laravel prompts features with hands-on demos.
Summary
Nuño Maduro packs a power-hour live session with updates that matter to Laravel developers. He kicks off by highlighting a big PHP Foundation move: Matt Staer joining the board, signaling stronger cross-community momentum for Laravel and PHP. He then shifts to practical Laravel topics, showing the new Laravel prompts primitives—task, stream, and data table—and experiments with a real command line flow. The talk doubles down on team management in Laravel, walking through the starter-kit teams experience and how Inertia v3 speeds up UI flows. Throughout, Nuño cross-pollinates AI-driven best practices for Laravel—covering Eloquent tips, migrations discipline, and testing reliability—while peppering in candid opinions about Jetstream, starter kits, and the value of code co-location. He also teases an upcoming YouTube video on AI usage by 10x developers and shares personal reflections on balancing streaming, gym life, and open-source contributions. The session closes with live-code vibes and a call to action for contributions to Laravel’s ecosystem through pull requests and community tooling like prompts. All in all, it’s a practical, opinionated tour of today’s Laravel landscape, with a strong emphasis on idiomatic code, tooling, and collaboration.
Key Takeaways
- Matt Staer joined the PHP Foundation board, signaling Laravel's growing Minecraft-verse presence in PHP language governance.
- Laravel prompts 3.15 introduces task, stream, and data table primitives, enabling richer CLI interactions and real-time UX in terminals.
- Inertia v3 enables snappier starter-kit teams experiences, demonstrated by the responsive UI when creating and managing teams.
- Laravel best practices AI skill is shipped with Boost, teaching idiomatic Laravel patterns for Eloquent, caching, authentication, and more.
- Data tables in prompts allow interactive tables with search and filters, demonstrated via a live PHP artisan command.
- Teams feature in Laval starter kits adds Team, TeamInvites, and Membership models, with slug-based access control and reserved names.
- Nuño teases two pull requests: a sluggable attribute for automatic slugging and an image processing API for efficient assets.
Who Is This For?
Essential viewing for Laravel developers who want to leverage AI-assisted best practices, explore Inertia v3 enhancements, deploy data tables in prompts, and stay current with PHP Foundation news and starter-kit team workflows.
Notable Quotes
"Matt Staer joining the PHP Foundation board is huge for Laravel—it's a bridge between Laravel and core PHP decisions."
—Nuño remarks on the significance of Matt Staer's board role.
"Laravel prompts 3.15 brings task, stream, and data table primitives for richer CLI UX."
—Demonstrating the new CLI primitives.
"The data table feature in prompts is sexy with a search mode and filters."
—Live demo of the data table capabilities.
"Best practices AI in Boost can generate idiomatic Laravel code, not just correct code."
—Commenting on the value of AI-driven best practices.
"Teams in Laval starter kits come with a Teams model, invitations, and membership—snappy and live."
—Discussing the Teams feature rollout.
Questions This Video Answers
- How does Matt Staer's move to the PHP Foundation affect Laravel's governance?
- What exactly are the new Laravel prompts primitives and how do I use them in a real project?
- How does Inertia v3 improve Laravel starter-kit teams workflow in practice?
- What are the Laravel best practices AI skills included in Boost, and can I customize them?
- How do data tables in Laravel prompts compare to using traditional UI tables in a Laravel app?
Laravel PromptsLaravel Best PracticesInertia v3PHP FoundationLaravel TeamsData Tables (Prompts)AI in LaravelJetstream vs Starter KitsData Migrations
Full Transcript
1. Hey, hey, hey. Hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey. Blackh. Now it white it white it it white it it white What? One. Hey there. Hey, hey, hey, hey, hey, hey, hey, What's up, beautiful PHP family? How everyone is feeling today? It's Monday, beautiful week ahead of us and I hope you guys are excited about this week because I'm super excited. Just went to the gym, feeling strong and today we have so much stuff to cover. Like I I just noticed that last week we have done a bunch of interviews to the channel and I kind of missed a little bit all the open source stuff that we shipped at Laravel.
So today we are going to cover so much stuff today. Okay. How everyone is feeling before we start things off. Legal Dom, what's up dude? Oscar for you. How you doing? What's up kick people and everyone on Tik Tok too. How everyone is feeling today? Hopefully good. Today will be exciting Chad. I have so much stuff to cover man. So much stuff to cover. What's up, Marak? Nice to see you. How you doing? Welcome back to my live stream. Nice to see you, man. W Marak, how everyone is feeling today? Hopefully good, man. Let me just show you what I'm thinking for today's live stream because it will be so much stuff.
Okay, so I just noticed that last week be because of the all the interviews we have done and we can just talk about that in a second. Okay, I literally missed talking about like a bunch of the stuff that happened not only on the Laravel ecosystem but also outside of Laravel ecosystem like the PHP foundation as well. So we have so much stuff to cover. So this is my plan for today. Okay, we are going to cover the news on the PHP foundation. So literally we have now someone from the Laval community on the PHP foundation.
I want to cover that a little bit. I want to talk about Joe Tenonbound additions to the Laval prompts project. So literally in Latel now we have a bunch of cool stuff regarding new prompts features. So I want to kind of cover all of that today as well. So new methods on prompts and you know new ways of checking tables and [ __ ] So we are going to see all of that today as well. What else we are going to we are going to double check as well teams on the starter kits. So starter kits in Laravel now also ships with teams and I want to talk about that.
I want to see the code behind the scenes and we're going to jump into all of that as well. Laravel now also ships with best practices which I kind of want to understand where that is actually going and I want to kind of dive into this those best practices to see if we agree with them as well. So I do know for a fact that best practices are now being published uh potentially somewhere here. So I kind of want to understand of that here we go a lot of best practices being published right here. So these best practices on architectures on blade views on caching on collections.
So we are going to see all of that today and kind of understand a little bit if we agree with them as well too. Uh what else? There is also new stuff regarding data tables on prompt. So that will be actually be done somewhere here I think. Here we go. And what else? Oh, I also found out this new website call it PHP sadness. And apparently we have the opposite of this call it PHP happiness. So hope you guys are excited. Type w stream if everything is okay. Picking flow. How you doing? Nice to see you dude.
Nice to see you and thank you all for the new subscribers on Twitch, but also on YouTube. I appreciate you guys being so supportive since day one, you know, since day one. Thank you so much for that. Okay. And what else I have to say? Um, I need to talk about like the new YouTube video I just have published. We need to talk about this as well. Okay. Were here we go. Charlie French boy, how you doing? Nice to see you. Welcome to the live stream. Nice to see you all. Shet, I have a new video on my YouTube channel called it how 10x developers actually use AI.
So, obviously, you know, last week because of the interview with Aaron Frances and Ian Lindman. Uh, I have a bunch of content and I have to kind of segment a little bit because you guys don't like huge huge interviews. You guys want to see the only the best parts of it and definitely this is like the 10 minutes con condensed of, you know, how 10x developers actually use AI. So, I'm going to send you the link chat so you guys can check it out. Okay, here we go. Here we go. Here we go. And be sure that you check this out.
And if you like it, don't forget, go here to this like button right here and make sure you click on the like button. Okay, this is super important to support my work. So, if you guys like this video, uh make sure you put like on this uh video as well. Okay, that's the link. Okay, that's the link. Okay, that's the link. That being said, let's move forward. Uh so, this is done. What else I have to say about this? I think that's it. Yeah. Yeah, let's keep it open. Uh, we need to say thanks to our sponsors, of course, our beautiful sponsors.
Okay, and they have news about PHP Storm. Okay, Redberry International, uh, one of the best Laval VGS agencies out there. They're absolutely awesome. Check them out. Beautiful team. Okay, redberry. International, one of the best digital agencies out there. We also are supported by SER API, which is literally Google search API. If you want to just literally have a JSON API endpoint to do your Google search results, you can literally use serapi.com. Also, Mailtrap. Okay, Mailch used to be like this local solution for emails, but now they also are production solutions and check them out. They're awesome.
I'm using them already and they're absolutely awesome. Jad Brains, which literally just renew um their subscription to my work. So basically they were they were sponsors last year and they just decided to renew the sponsorship for this year as well. Okay. So w everyone typing wjet brains for supporting my work since day one as well. Obviously they have the PHP Storm editor which today we are going to dive into a bunch of stuff there as well. Titan.com if you want to have a team that builds and rescue web apps and development teams check them out.
They're absolutely awesome. Okay, absolutely awesome. And of course uh code rabbit if you want to have some nice AI reviewing your code through pull request and I actually think that products like um jet brain like code rabbit are going to become insanely popular in the future. At the beginning when I first saw code rabbit I thought why the hell I would like AI to review my code through pull requests but now I feel like this is becoming more popular and more popular. So you know check them out code rabbit.ai they're absolutely awesome. Okay what else?
I think we're ready to start this man. I want to start I want to start by this Matt Stalford news on the PHP Foundation board. Did you guys saw the news by the way? Did you guys saw the news that literally Matt Stalford just joined the PHP Foundation? This is huge. This is absolutely huge chat. I don't know if you guys realize but Laval didn't manage to have anyone like on the ecosystem actually being part of the PHP Foundation. So now we have Matt Staler being part of the PHP Foundation. They literally just released an article about this.
Let's actually read the article real quick. Okay, here we go. Oh, here we go. So, the article is written by Elizabeth, which I think is the new managing director of the PHP Foundation. Okay, it's literally like the president of the PHP Foundation at the second. So, and one of the first majors, one of the first things she did is literally announced Matt Staler to join the PHP Foundation. This is huge because now Laravel can be represented on the PHP foundation not only in terms of the PHP features but also like in terms of PHP decisions you know kind of having a beautiful website.
Um you know most of the things we really care uh in the Laval community that we really want on the PHP language Matt Staer also believes on them you know. Um I also literally saw a tweet that everyone was saying like oh can you make sure you have a [ __ ] beautiful website and Matt Stafford said that is he he will literally push for that. So, I'm excited about this. John Sugar is saying the following. Um, how could them not support past? Absolutely. Jet Brains is supporting past as well besides my stream, which is absolutely awesome.
John Sugar is also saying, "Yes, I have saw that. I can vouch for Matt." Yeah, Matt is actually, you know, if I can think of someone to be part of the PHP Foundation, I think Matt Staler is actually the perfect person for that, you know. Um, he's like a people person basically. you know, he knows how to speak with people. He knows how to do good networking. So, I'm very happy that we are actually having Matt Stafford on the PHP Foundation. Okay. And John Sugar is also saying that he with them on a couple projects.
Great guy indeed. Ron North is saying good morning everyone. What's up, dude? Welcome to the live stream. Rafael, what's up, dude? N welcome, welcome, welcome, welcome. Nice to see you. Okay. So he's joining the board members but also like not only Matt is a Laravel expert but also have created and maintained dozens of PHP and JavaScript open source projects and something to keep in mind is that in order to be part of the board and keep in mind that one thing is the board another thing is like the core developers and Matt is running the board.
um to be part of the board you don't actually need to be like an insanely crazy talented open source guy. You just need to be someone who is able to take decisions with other people you know and someone being very good doing that. And obviously Matt Staer is managing his company for a while now. He obviously have a bunch of experience over there but also like he have published a book he have hosted a bunch of podcasts. So he talks with people uh already for a while. So super happy to have Matt Stford on board.
Everyone typing watt by the way. I want to everyone in the chat typing WMAT. Okay, 50 people already joining the live stream. That's awesome. Everyone typing Watt Watt for the win. Okay, what is this? I cannot see anything. Oh, that's a bug, I think. It's 100% sure a bug. I cannot literally see the comments. Great addition. I cannot imagine a better edition. Bada boom, bada boom. Everyone's super happy, which is so good. Great news. Great news. Matt Stuffer is solid. I have no great human. Yeah, this is very good. W Matt, everyone. Thank you. Thank you.
People excited. Oh yeah. Oh yeah. That's so good. That's so good. Okay, so this is the first news of the day basically. Matt Stafford joining the PHP Foundation. Great news. Okay, what else? I want to kind of code a little bit today. Uh Chad, should we start with the Laval prompts news or should we jump straight into the Laval Teams news? Okay, type on the chat teams or prompts. Okay. Um, today we are going to check them both, but which one you want to start with? So, we have prompt stuff or team stuff. That's the we are going to check them both anyway.
So, okay. We also have to check a lot of our best practices which I'm going to save to the middle of the live stream, I think. Teams. Okay, let's jump into the team stuff. You guys command. You guys command. So something to keep in mind regarding teams is that I do know that to opt in into teams you just type like laval new whatever you say yes you choose your starter kit you choose whatever and then you just select if you want teams or not okay this is basically how you opt in and I do know for a fact that we are doing this by um selecting this no by default because we want you know this feature to mate a bit uh within teams John is saying the following your title doesn't mention but you also released is like Vid Plus in your starter kits.
Um, so Vid Plus was released on my starter kits, not on the Laval starter kits yet, let me correct this. Okay, so Vid Plus haven't yet been released on the Laval starter kits yet. They may come. Okay, it takes a little bit because something you guys need to keep in mind is that on my own starter kits, I can just ship broken stuff. Okay, and it doesn't really matter because it will eventually get fixed. on the lot of alert kits. We need to be a little bit more careful so things take a little bit more time.
Yeah. Yeah. In my starter kit. I know. I know. What's up, Valtox? How you doing, Ron? Nice to see you, Chris. What's up, dude? Perfect content for AI. They could parse it. Lol. Oh, I know. W Matt. Oh, yeah, baby. Okay, so basically say yes or no, and that's it. If you say yes, if you say yes, you get a bunch of stuff in your application is skeleton. So typically, as you may know, Lavel ships with a bunch of stuff already, including the user model. But if you say yes to teams, you get the teams model, you get a team invitation model, you get the membership model.
So it comes with a bunch of stuff on top of the existing Laval skeleton, which is good by the way. Okay, I want to say something and you guys let me know if you agree by saying yes or no. Let me know what you think. But I do think that when I'm opting in to a feature, I much rather see that feature actually being published on my source code. Okay. And this is exactly what's happening with the teams feature, which is I have the team model just like normal. I have the team invitation normal just like normal.
And I much prefer to have this. What do you guys think? Type yes or no in in terms of what you think about this. I'm much rather to have this. By the way, what's up Janito? Nice to see you, dude. How you guys doing? Parv, what's up, dude? Nice to see you. By the way, chat, as a reminder, we just published a new YouTube video. Make sure you go there and you click um on the like button. Insanely important. Okay, just click here if you want to support my work. Takes a second literally. Okay, I just published the link over there on the chat so you guys can do it.
easier to change. Exactly. Exactly like Cris is saying, also by having the the code being published directly on the source code, you can literally just change whatever you want to. No Eden stuff. Exactly. I think like at some point Jet stream was kind of um doing some sort of behavior within the framework but since then every single feature it's just published directly on the on the on on the skeleton itself and I much rather to have this okay so prompts to end to decide this shiver is saying the following why creating in boot instead of booted Like I don't know.
That's a good question. I don't know. I always have used the boot anyway, you know. I don't use the booted, you know. I don't even know the difference if I'm honest. I always use the boot thing. Okay. The music is so hot right now. So good. I was just going to ask about Jetream. Yeah, Jetream seems dead to me. I feel like I wouldn't use Jetream ever, you know, because right now we have the starter kits. So why would we ever use Jetream? Is anyone using Jetream? Can we just agree that Jetream is Type Rip if Jetream is dead?
Okay, type RIP if Jetream is dead. For me, it's dead, man. Asparento, what's up, dude? How you doing, V? Nice to see you. Rip, rip, rip, rip. I know, dude. It's just dead, man. You know, people use a starter kit. That's it. Just so it works. It just works. Okay, now uh let's see a couple of things that the team stuff published. Okay, what else we have? Let's actually see this on the browser. Can we do that? I think we can. Okay, let's go to the terminal. Let's go all the way up and let's type composerdev to see all this stuff on my browser.
Okay, here we go. We have a link. We can just copy this beautiful link. Let's just do it. Go to the Safari. Here we go. And open it. Uh, okay. I want to register myself. My name is Nuno Maduro. Yes. Yes. Yes. And I'm going to use a simple that simple email. Bam. Bam. Create account. Save password. What else we have? Oh, I'm already on my team. Nice. Good stuff. Can I say new team? I'm going to create a lot of L team. Okay. So, now I can be in my team and I can be on a lot of L team.
Do you guys see how snappy this is? I am a,000% confident that this is using the new inertia V3 features that make this so much faster. Good stuff. It's really fast. Nice. Good stuff. Oh yeah. Oh yeah. So nice. K James is saying the following. May I ask you uh does Lavel team uses AI to write code from scratch? Yeah, we use AI. I use AI all the time. Who doesn't use AI these days? Honestly, like we are passing. We are over that already. Like everyone uses AI. Let's just agree on that. And when you use AI to write code, it's still your code a little bit.
Okay? So you don't have to say I've used Cloudflow to write this, you know, it's still your code. You know what I mean? Mar is saying the following. When you when you use Escalite in memory for testing locally, but production uses MySQL, it's all right. Always match a database. I'm going to say something. You know, I used to be a believer that you would be it would be kind of okay use SQLite if you are using MySQL in production. Not anymore. Okay. So locally your environment must match exactly what you are using as in production as close as possible.
Okay, SQLite does behave differently um than MySQL. So you need to be super careful about that. Okay. Insanely careful. Okay. So always match exactly like Veltx is saying. Okay. Okay. Okay. Very important. Shad, I'm feeling so strong. I went to the gym today. I was like beating all the records on machines. I'm just feeling so good, man. Honestly, just so happy. Just so happy today. Okay, so that that's teams, man. Can I What else I can do in teams? I can create new teams. Okay, how can I delete my team? Oh. Oh, right here. So, this is the personal team.
This is not the personal team. Okay, I can invite people. I can delete teams. How can I manage people like uh like invite people and [ __ ] I guess I can because I saw the model. So, um, where where do I do that? Right here. Yes. So, I can invite people. Let's invite, for example, uh, Taylor for this team real quick. So, if I do this, I invited Taylor. And now, this is a pending invitation because Taylor will receive an email. Yeah, this is like pretty much what I would expect. This is exactly like we use Teams on pretty much every single project at Lafell like Vapor, Forge, Cloud initially.
So all of that just used just basically code like this. Very simple. Yep. Yep. Yep. I can I can send any invitation indeed. Are you feeling are you feeling better? Last week you sounded a little bit sick. Uh dudesh I don't I don't know if I need I don't need to share this but last week was just everything happened honestly you know emergency family emergencies. Um what else? Uh I came back from vacation always gets got sick again. Anyways, you know, it's something that I need to get used to, you know. I don't I don't need to feel bad about that.
But, uh, obviously like as a streamer to be able to stream, I need to just I cannot feel sick basically, you know. And if I'm sick, I cannot stream. That's it. Period. Um, but I just noticed more now because if I'm sick, I cannot stream. But back in the days, if I would be sick, I would still work, you know, like as a developers, if we feel sick, we can still work. I don't know what you guys feel about this but you know as a developers like we can still work if we sick. Okay. All right.
I want to see a little bit of code on what is security controller. Is this new? No, this is not new. Okay, cool. Profile controller team controller. OH, WE'RE using actions. Nice. Good stuff. Uh something I would do here by the way is that I would call this store. You know, it immediately triggers my OSD. Like honestly, if I see store here and then I see like save team request instead of being store team request, it just triggers my OSD instantly. Okay. Yeah, I would I would honestly just do either create here and create here or do store and then store here.
Probably create makes even more sense. Yeah. Store, create, create. That would make a lot of sense, but you know what I mean. So, um, so we have the request, we have the action. This is cool stuff. Nice, nice, nice, nice. We have the edit and then we have the update just below equally. Oh, it's like the same because it's like being reused. Very interesting. Very very interesting. So, we calling this save because this is a form request being shared between the both update and create. Very interesting. Nice. Ah, this code was stolen from cloud. So good.
Oh my god. Yeah. So on Lavl, this is so interesting. So on Lavl cloud um let me tell you this story. So let me go here into uh save team request team name. This is very interesting. So on Laravel cloud initially we had this thing called it organizations. Okay. And organizations may have a slug and a name obviously but the problem is that there were people calling their organizations like stuff like contact you know or stuff like support uh this is so cool and stuff like support and uh 404 you know so you don't want to have organizations using that name because then their slugs would be something like this you know exactly it would 404.
Can you imagine? What's up? We have Paul. Nice to see you. And then like the slug would be 404, which obviously doesn't make any sense. By the way, we have close to 80 people on the live stream chat. Don't forget, go all the way down, click like on this live stream if you're having fun. Yeah, this is so fun. So, people were basically doing stuff like this, you know, like they were calling uh uh contact and [ __ ] like that. And uh they were having like very na names that are not organization names basically. So it's funny because now we see already on this skeleton we see already a list of reserved names like API is reserved which makes a lot of sense.
uh careers, for example, case studies and all of the things that typically um people may actually not use or shouldn't use. Delete. Yep. Yep. Uh good stuff here, man. This is good stuff. So, team name is a custom rule. Makes a lot of sense, honestly. I like this. I like this. Good stuff here, man. What else we have? Insure team membership. Oh, yep. Yep. Yep. Right. Right. Right. Right. Right. So this is basically to ensure the the person belongs to the team. So if it's not logged in, it cannot see it cannot do user stuff.
If it's doesn't belong to the team. Nice, nice, nice. Good stuff here. What else we have? Uh we're using slugs. Oh, right. By Yeah. Do I want to talk about that? Maybe no. But yeah, team slugs, of course, for the So I assume like if I go here, I see Lavel. Nice. And if I go to Nuno is team, I see Nuno is team as a slug. Nice. Cool stuff. In my opinion, those names should be in the configuration file. Yeah, you know, I don't know, man. I don't know if I agree on that because if you have a bunch of let's say um form requests in a bunch of custom rules, if those configurate like I'm a huge believer that code should be colllocated.
Okay. So if you have an array of elements and those elements will always be used in a single one place then why abstract that to a separate separate configuration? You know what I mean? I don't know if I agree on that. Okay. I don't know if I agree on that. We have an enum. Nice. Enums in PHP. Good stuff. If the guy is a owner, admin, or member of the team, nice. Good stuff. We have concerns. Nice. This is cool, man. I'm happy about this. Oh, we just found a bug. This membership thing is not being used.
Should we pull request this? I don't even know where to do that. So, anyways, this uh variable needs to be removed. It's not being used like all the way down. Nice. Good action here. Here I would use the query thing but good Yep. Yep. Yep. Yep. Ron is saying the following. Olive by rule of three. One make two copy three abstract. Oh yeah. I wonder if we have a bunch of tests that ship with this. It would be interesting. Oh, we do. Nice. Yeah, this is kind of cool to have a bunch of tests that are being used already.
I wonder how the coverage is. Can I check that real quick? Let me see. 92%. Not bad. The action oozes handle but laval best practices says execute. Oh really? We are going to also see that today by the way the laval best practices stuff right after checking the the terminal stuff from Joe. Very cool chat. W teams. Everyone typing W teams. Do we have anything else to check on teams? I would 100% sure use this and I'm gonna very likely to migrate all this stuff to the new to my own starter kits 100%. Everyone typing W teams by the way.
Everyone typing W teams. Good stuff here. Let me check something real quick. Yeah, there is something chat I'm going to teach you. I'm going to tell you something which you know this is highly discussable. Okay, this is highly discussable and maybe you don't agree with me but you guys let me know. Sometimes if I'm doing a request and I don't have access to that request, what do you guys think we should return? Should we return a 403 or a 404? Type on the chat 403 or 404. Again, you are trying to do something, trying to access an ID or post to an ID or post to a slug that you shouldn't.
Should you get a 403 or a 404? This one will be interesting to discuss and you guys will understand in a second. And this is the perfect case by the way. Okay, let me just show you this is the perfect case. Okay, so we are aborting if the user it's not logged in, it doesn't belong to the team. Then we return 403. Here we go. So everyone is saying 403. Now let me tell you something. Exactly. Oh, here we go. Flurfu is answering exactly what I think. Okay. I think we should return a 403. A 404.
I think we should return a 404 because by returning a 403, you are telling the user there is a team with this slug. Okay. So if the user is an accurate or whatever, it can literally understand, okay, I know now that there is a team with this slug. There is a team with this ID. I'm giving away information to someone that he shouldn't. Okay, so a lot of people saying 403, which is honestly it's what most people would answer, but in my case, I would always answer a 404 here just because if you answering a 403, you are literally telling the actor or whatever is doing the post request, oh, there's actually something here.
You just don't have access to it. You know what I mean? This is like this is good stuff. Okay, this is very good stuff. Like um you basically want to tell the user no just you know there is nothing here. No nothing here for you basically. Okay, this is what you want to say. There is nothing here for you and the 404 is a little bit more interesting to do that. You can also figure it out this by trying to create the network. The slug the slug shouldn't be secret. Um maybe dude because what you can do is say that uh something a little bit different on the message.
Something like you cannot create a slug with five characters or whatever. You know what I mean? Like you can be a little bit more you can eat it as well. It's something small that an would use. Exactly. Now not a lot of people agree with this by the way. And if you don't agree with this it's also fine. It's also fine. A lot of people don't agree with this and they would answer 403. Okay, but I personally for my own stuff I would definitely return here at 404. Uh what else we have? Uh yeah, good stuff in general.
Okay, I like it. Good stuff. But yeah, I think in general like authentification like stuff like this, you should always return 404 by default. 404 by default basically. Okay. Every time you have a 403, just replace it with a 404. Okay. All right, chat. I want to see the new stuff from Laravel. Okay. So, Laravel literally shipped uh Taylor just tweeted this out. Let me just refresh this a little bit if I can see it, please. Come on. Here we go. So, Taylor just tweeted, we just shipped a new boost skill called Laravel best practices.
It equips your AI agent with 100 curated Laravel best practices covering eloquent caching cues authentification and more. It can generate code that is not just correct but idiomatic. You type composer update, you type PHP artisan boost install. This is to get this on the fresh new pro existing project. However, for a new project, we should have already all of those skills. Here we go. I go into cloud. I click on skills and I have Laravel best practices and AI is already aware of all of them. So we are going to jump into this in a second.
Isn't that a theory that Axe returns a 404? Did I did I told you guys the outcome of that? I I also tweeted that yeah that's a huge story but basically at some point X was returning a 404 out of an endpoint to instruct the browser that it shouldn't actually go there often uh to try to scrap that uh that's a theory yeah that's a theory Bruno Mr. Pri is saying the following 403 it's for general things uh where um is not called with any identity um and if that is some unique identity there should always be a 404 yeah I mean you know all this stuff is discussable okay but but yeah all right let's jump into Laravel best practices again this is already been shipped this is already on pretty much every single boost application and what it does is instruct cloud code our codeex about what is idiomatic within the Lavl world.
Okay, let's just you know kind of go into this advanced queries. That's a good one. Use ad select soup queries for single values from has many. Instead of eager loading an entire as many relationship for a single value like the latest time stamp, use the correlated soup. This is like a hard one. Jesus Christ. Can we have something a little bit more simple? This is literally advanced eloquent. What is this architectural thing? OH, OKAY. Extract discrete business operations into invocable action classes. This is actually a good point. I actually asked this to Taylor directly on stage at Lakonu.
Do you guys think we should always use actions or you should only use actions if you want to kind of reuse business operation across multiple places? What do you think? In general, I would use always classes even always actions even if the action is being used in a single place only. Taylor in the other end, he believes that controllers can be fat and should be fat and you would just default to action sometimes, not always. What's up everywhere? How you doing? By the way, if you just arrived chat, my name is Nun Maduro, PHP Lavel developer.
I love what I do and I am a streamer from lot of uh stream Lavl stuff all the time. stream PHP stuff all the time. If you guys appreciate my content, make sure you go all the way down and click on the like button. Insanely important is right here. You just click on this beautiful right like button below me. Boom, boom, boom, boom, boom, boom, boom. Let's see what he's saying. So, we have Fareto saying always actions and BA is saying the following. Um, how about using services? Well, that's something I don't actually believe on.
I don't use services in the way that people call services. Uh basically I use services classes when I want to interact with external APIs. That's it. That's the only thing. Rafael is saying the following always depends what it depend what what exactly depends on. Oscar is saying the following I always prefer actions. Me too. Dominic started saying when is the day we joined the PHP Foundation? Why would I want to join the PHP Foundation? Like I'm I'm good. You know there is so many stuff you can do with your life and you I don't definitely have time for anything else at the minute you know with gym live streaming work that's it my my day is like full you know I have also a family so that's it dude but yeah my day is so full at the minute I'm using actions a lot me too dude I'm using actions all the time.
I love actions. Why wouldn't you take decisions for the PHP family? Well, I would I think I already do a lot for the PHP families, you know, like I already do a lot for the PHP ecosystem. I feel, you know, I have a bunch of open source work already, you know. I do live streams. So, what what else do you want more, dude? Come on, man. Come on. All right, Shad. Let's go back to the actions. I would call this Andle, by the way. Okay. In terms of actions, I always call my public function handle.
This is so little though. Like discussing if you should call your actions methods, execute, handle, invocable, or whatever. It's literally so small is like is an undiscussible thing honestly. Although I'm curious like what do you guys use? Do you guys use execute? Do you use handle? A service class is injected into the action. Exactly, Chris. Exactly. This is that's the way to go. Ashkco is saying the following. Um I started with a fat controller then service and now I cannot write code without action classes. I use I like action classes too man for the win.
Marak is saying execute. However, Buru is also saying execute. Um couple handles here here and there. Nice nice both. Well that's something I don't agree on. You either call it execute or you call it handle. But you don't call them both. Like you know you use NodeJS. Well, no. GS is also cool, dude. You know, we love all technologies on this live stream. There's a few technologies we love more than others, but invocable classes if possible. Yeah, that's that's all. Well, the problem with invocable, let's assume we call this invocable. Okay, let's go back to the create team example.
If we call this Oh, it's missing the action here too. Anyways, if I would call this invocable or invoke, let's call it that way. Like, how would you Let's go back here to the create new user. Yeah, you would how would you call this? Like, would you do this? You know what I mean? Just feels like crap. Like, why would you do that, you know? Or would you do this though if it would be invocable, you know? I don't think it's like worth the [ __ ] the statical [ __ ] of it, you know. I will call this handle.
I think handle for actions. Exactly. Execute for query actions. There we go. Oh my god. Yeah, I would call this handle chat. It's just much much practical. That's it. I would just go here handle and that's it. Just works, you know. Execute is also okay if I'm honest. Hey, Laravel also recommends to use the service the service thing here. So, this is cool stuff. Use dependency injection. Always use constructor injection to avoid app or resolve inside classes. So, incorrect. Oh, I actually don't agree on this one. I think this should be this if this is a control.
Oh no. Yeah, this should be this like meta injection on controllers only though on classes normal classes. Uh, I would use a regular constructor. By the way, Chad, I'm also on Instagram if you guys want to give me a follow. Okay, here we go. Here we go. Here we go. Code to interfaces depending on contracts at system boundaries. Yeah. Well, on this we agree. Yes. Yes. Yes. So, basically have an interface especially with stuff like payments where locally you'll have like a fake or whatever. So, this makes sense. I would call this Stripe payment gateway.
So, the interface will have a generic name like payment gateway and then you have Stripe payment gateway and local payment gateway. That's the way I would go. We can probably do a pull request on this where this stuff lives honestly. Let me see. Give me a second. Okay. Okay, it lives right here under boost. Here we go. Oh, there's so much stuff to Yeah. Do I want to do that now? Maybe not. But by the way, I'm going to I'm going to send you the link in case any of you wants to contribute. Okay, there we go.
Here we go. That's the link. Sort by descending when no explicit order is specified. Sort by ID or created at descending. Explicit ordering prevents. This is very good by the way. This is a very good rule. Uh not a lot of people know about this but like a lot of people assume that if you do something like this, this is very interesting by the way. So if you do post uh all let's call it that way. Which one do you guys think will be the first appearing? Like let's assume we have one post ID 1, ID 2, ID3, ID 4.
If you do post all, let's actually plug ID for example. Okay, we plug the ID and we get them all like what do you think will be the order here? Because a lot of people think will be 1 2 3 4 5 6. However, the problem about this approach is that depending of the indexes your database has and depending of how your database is structured and organized, you may actually have a different order here. Like totally different order. So what you can do and should do is always specify the DB does whatever you want. Exactly.
Basically that basically that and what you should always do is always specify the ordering. Like if you depend on the ordering just just always specify the ordering like always. That's exactly what this rule is about which is good. Use atomic locks for race conditions. Yeah, this is good stuff as well. Oh yeah, baby. Oh yeah, good stuff. Lock for update. Oh yeah. Use MB functions for string functions. This is a PHP rule or really an architectural one, but yeah, good stuff Use defer for post response work. Interesting. For lightweight tasks don't you don't need to survive that don't need to survive a crash like logging analytics or cleanup.
Use defer instead of dispatching a job. The callbacks runs after the PHP response is SE sent no Q overhead. Very interesting. So instead of using a regular dispatch which will dispatch a job and log that we just basically defer uh the the logging or we defer the analytics to be executed post sending response to the user. Interesting. Would I would would I use this I think I would, but I would need to check what defer does though. Oh, it just reduces a call back like on the kernel to send after the response. It might be that.
Yeah, let me just confirm this real quick. So, I return a new defer. I create a new collection. And then I add that to the existing deferable collection. Nice. Okay, so I guess like this stuff will be executed after the response which is kind of interesting if I'm honest. What's up pushback? How you doing, dude? How you doing? Zicki, what's up? Nice to see you. By the way, if you just arrived, my name is Nuno Peachbin Laravel developer. I love what I do. And today we are checking the Laravel latest news um on the past week which you have which we have a bunch of stuff including a bunch of AI skills which gives you better idiomatic Laravel code.
Use context for request scoped data. Yeah, this is a good one. We actually use this a bunch of on laval products like sometimes you have this middleware which will have just a bunch of context of the request like where the request came from like what is the request where is the context of the request like which form was used and [ __ ] like that you can literally add that to the context so then the logging information will be much richer okay if you were to log like an exception if you throw an exception anywhere that exception context will contain all of the context you have added so far.
So, I love context for that reason. Okay. Yeah. The Yeah. The defer is a closure that runs after the response is sent to the user. Indeed. Context is dope though. Concurrently run. I actually wanted to ask you guys, does any of you ever have used this concurrency facade thing? This is something very interesting. Like we actually debate this at Laval very often. There is stuff which looks shiny but in reality people just don't use it ever you know and I'm kind of curious if you have used the concurrency facade type yes. If you haven't used the concurrency facade type no you see.
Oh wait there's actually a few people who have used this. Wait wait wait wait. One thing is that you have played with it. Another thing is that you have actually used it on real stuff. Okay. Well, I'm surprised though. Well, never mind, chat. I literally maybe I'm confused. I don't know, man. I I honestly feel like if I want to do something will be either like sync work and on that case we want a sequential execution or it will be a sync and on that case I wouldn't use the concurrency facade I will just do a Q job you know what is Mastrostro is tool that the open source team at Laravel uses to reproduce the changes across all the starter kits is equivalent of promise all uh more or less dude in terms of API is the equivalent of the promise all however this uses like Q jaw this uses like behind the scenes of these concurrency drivers and some of them are a little bit heavy you know they actually execute the thing on the terminal here we go they use the fork facade God, and forking is expensive as well on PHP.
I don't think I would ever use I honestly think I would never use this. I think it looks cool, you know, in shiny, but I don't think I would use this cuz the fork like how many drivers do you have, right? We have the sync, which is basically like the the regular sequential execution. We have the fork from Spy, which is super heavy in memory wise. Like this literally doubles your memory. I don't know if people know this but like the fork system of PHP literally doubles the double not doubles like every single fork you create you will basically copying every the PHP process in memory to another place you know so if you have 50 requests let's say 50 requests and you fork them all you know what I mean you are literally doubling the memory in your web app that's why PHP natively needs a sync Well, you know, I don't think that will ever come to PHP.
It's just too late, honestly. You know, let's assume, Bruno, let's hear me for hear me for a second. Let's assume PHP gets a sync natively. Okay, let's assume that happens. What happens after like there's like the full database? It's not a sync. So you know like you cannot just simply migrate Laravel into it. So that's it. Nothing is happening. You know even if a sync would come to PHP like you would have all these existing frameworks which are not a sync therefore people wouldn't move into it. That that's the same reason why nobody uses fibers you know or react PHP really or you know like all these async frameworks.
That's the reason why nobody uses them. It's because they don't they do not support well Laravel is not a sync by definition even like other everything else like uh you know uh Symfony uh Zen framework uh WordPress Drupal like all these frameworks they're not a sync they will never be honestly fragant PHP though hear me out I think like fragen PHP though it's actually a very good example of something jumping to the PHP ecosystem that really just works. I think franken PHP it's not um how do I say people don't appreciate enough how good actually franken PHP is because it's something that got developed introduced on the PHP ecosystem and it just works like this is exactly what we need like nobody wants to change their code bases they want something that jumps into the thing and just works that's why like Octane with Frank and PHP was so successful because it just jumped to the ecosystem and it really just worked.
Um you know and I think like if you ever develop like an open source thing something you need to keep in mind is that all right how do I make sure people type composer require and this will work from the like instantly this is what you guys need to focus like literally and when you think a little bit about some of my projects that I've put it out there things like laval pint or you know uh some of the small tooling um all of them just works like you type composer required and bam you just it just works.
You don't have to configure anything. You don't have to change your codebase. This is so important to adoption basically. Bruno is saying the following. Some point people would adopt it and Laravel would certainly start supporting it. Well, I think like Laravel would start supporting it if the adoption can be incremental. You know what I mean? like then maybe you know but I don't know how about Pokeyo. Yeah, I mean Pokeyo as a project is interesting but I don't think we'll ever be adopted. Composer is magical. Yeah, Composer is one of the best pieces we have on the PHP ecosystem.
100%. 100%. All right, what else we have here as rules to discuss real quick? Let's go into the So, so far we have seen great rules so far. Let's see what else we have. Let's click on rules. Blade views. Uh caching. What else? Migrations. We have a down method being recommended. That's interesting. Always use PHP artist migrate for consistent naming and timestamps. That's important. Use constraints for foreign keys. Yep, I agree on that. Never modify deployed migrations. Yep, I think that's Well, would the AI do that? That's crazy though. Add indexes. uh in the migrations.
That's important. Like people literally forgot mig indexes all the time. Wait, don't foreign keys have indexes? Isn't like constraint in foreign key automatically indexing the given value? Maybe I'm confused. Let me ask this in Laravel does make sense to have this index doesn't maybe I'm confused now for key and constrained just add it by default I must be confused. Then oh very interesting shad very interesting we always learning shaded we always learning so depends in your database on MySQL and Mariab the index is redundant uh enoB automatically creates an index when the foreign key constraint is added via constrainted however on Postgress SQLite uh on Postgress the index is not redundant.
Postgress does not automatically create an index for the foreign key columns. So you need to explicitly say index. That's so interesting. How about how about Squeal? Squeal does not automatically have an index for 4 in key columns either. That's so crazy [ __ ] Honestly, I thought index would just needed. It's crazy, man. That's so interesting. Today I learned honestly, right? I cannot be the only one. Did you guys know this? If you already knew about this, type yes. If you do not know this, type no. I'm generally curious about this. So interesting. Even Squeal doesn't do that by default.
Cloud code saying squeal is typically used for testing in local development except nuno that uses squeal in production. Well, apparently all of you knew about this. Well, I didn't. By the way, chat, don't forget we have a new video coming out today called 10x developers actually use AI. If you haven't put like on this video, make sure you do that right now. It's insanely important, okay, for supporting my work. You just come here to this like button right here and just click on the like button just like that. Bam, bam, bam. Okay, that's the link for the sh for the video.
You didn't know? Well, welcome to the team. How how is the rule so far? Let me see. So, about this, the rule literally says add indexes when creating the table, not afterwards. So, which is good. Mirror the defaults in model attributes. When a column has a database default, mirror it uh in the model so new instances have correct values before saving. Oh, interesting. Write reversible down methods. So we are recommending people to write down methods. We could just fix this and say don't write down methods and that's it. Implement down methods for schema changes that can safely be reversed via migrate roll back.
Keep migrations focused only on concern per migration. Never mix uh schema changes with data manipulation. Just by the way, just by the way, um, just by the way, I no longer agree that many data changes should go to migrations. Okay, Shad. So in the past I was telling you guys that regarding migrations you can have two things right you can have schema changes and you can also have data changes. Now something I have been noticing a little bit is that if you have data changes over there you can no longer squeeze the migrations which I still have to find a way of doing this properly.
And so far what I've been doing is that data manipulation no longer goes to migrations and goes to regular commands. So I always have like this command PHP artisan let's say data potato whatever where I just see the default settings for example. Um I don't think cedther are also the answer but um but yeah pinky works without indexes. Uh yeah, I'm pretty sure it does, you know, but also like indexes while typically um you want to have them, you kind of want to add them when you actually need them, not not all the times. Sabrita is saying the following.
Could you ask Claude about unique as well? Yeah, absolutely. And maybe I was confusing with the unique stuff. How about the unique? That's a good question. Oh, so that unique indeed adds the index stuff all the time. So if you have unique, you don't need index for all database engines. We have the smo, we have to spoil the guidelines 100%. John Sugar is saying the following. People don't talk about how AI actually teaches you. Yo yeah man I use AI to teach me all the time. I have so many deep conversations with AI. Does any of you also have like this deep conversations with chat GPT to understand how your brain works?
Like honestly um you know I have this deep conversations with AI trying to understand like how can I become a better person like why I'm an [ __ ] sometime sometimes like why sometimes I'm mean to people and I trying to like to make a lot of questions you know like sometimes I asked um um you know I like to ask stuff like you know for example if I have something that I regret doing for example like having a conversation with someone and I said something that I shouldn't I like to ask ship like why did I do this, you know, like why did I have why did I say that to that person on that context?
Like what what the [ __ ] is going wrong with my brain? So I I love to have this big conversations with AI sometimes. Let me know if you guys also do that. Q and job best practices set the retry after greater than the timeout. Yep, that's insanely important. That's a good one. Use exponential backoff. Super important as well. Indeed. If you want to try to sync with Stripe, you want to try after yeah after 1 minute but then after five minutes and then after 10 minutes basically be exponential back off. Good stuff should be unique 100%.
Good stuff here as well. Always implement the failid uh yeah that's a good one too. Even though for simple stuff I wouldn't do that. Rate limit external API calls in jobs. Yep, I want to do that too. Batch related jobs 100%. Retry until needs try zero. When using time based retry limits, set tries to zero to avoid permanent failure. Oh, interesting. Without overlapping. Nice, nice, nice. Yeah, this is cool stuff. I think in general like you know I would agree with 95% of the all of the rules here you know in some way like detailing rules to AI will always be opinated like I'm pretty sure like not everyone agrees with 100% of the things we see here u but most of it we do agree like you know model route binding of course uh scoped bindings of course you know you kind of agree with most of it you don't have to agree with everything but if AI respects like 95% of it I think we are in a spot already.
Back off uses minutes. No, no, no, no. Back off uses seconds. I'm sorry. Yeah, back off uses seconds. I could be wrong though, but I think uses seconds. Yes, chat. I want to check real quick uh what else is new regarding the terminal. So let's just type Laravel W skills for everyone involved on making this skills uh in Laravel. I think overall we have a great result in terms of you know idiomatic Laravel apps. So congratulations to everyone involved in this one. I think this is good good very good stuff. Okay so we have seen the PHP Foundation news.
Okay we have seen uh the Wendell teams. Yep. Yep. Yep. We have seen the AI skills as well. We can close this. Let's actually do this one real quick before jumping into the terminal stuff. Did you guys saw literally someone posted like a website called it PHP sadness which literally tells you like the worst stuff on PHP. But this this looks very old though, you know, like function naming underscores. Well, you know, I don't even know if this is a good thing. Anyways, a bad thing I mean, but someone posted this and then I saw a website called it happiness, which is literally the opposite of sadness of PHP sadness and literally tells you the best things in PHP.
Name arguments, union types, intersection types. I don't want to spend too much time on this, but I'm going to send you the links guys if you guys want to check it out. Nuno approve of the skills. Well, there's a few things I would change. you know, I don't know if you were here when we talked about this, but like there is a few things I would uh change on skills, but like um but small stuff, you know, push back, small stuff. Um some naming conventions that I would uh for example, let me just go here and show you real quick.
Uh a lot of best practices architecture. Um so here I think this is a good example. you have this use dependency injection always use constructor injection avoid app or resolve inside classes. So here for example especially on controllers I would never use dependency injection. I would always use method injection instead you know but again this is small stuff I feel you know what I mean this is very small stuff but I hear I would use method injection as well. So probably I would have to defer you know if you are on the controller use method injection if you are on the regular class just use uh dep regular dependency injection.
Um, another thing I would do here, I think it was on this interface stuff is that we have this interface call it payment gateway and we have this stripe gateway. So previously was like this basically okay payment gateway binds to stripe gateway. So here for example something that instantly jumps into my mind is that this shouldn't be called stripe gateway but stripe payment gateway instead. You know what I mean? So then we would have like literally two things. would like realistically on the app service provider what you would have is something like this if you are like in production you know what I mean like if I am in production then I would bind this crap like the stripe one um but if I'm not in production then I would bind the fake payment gateway instead you know what I mean but I mean this is like very small stuff honestly it's not even worth to change I think but you know PHP happiness lot Lavl for the win.
Yeah, it's better cons. Exactly, John Sugar. It's better to be consistent than uh being, you know, using different conventions. So that's good. Okay, so we have PHP sadness, we have PHP happiness. I'm going to send you these two website chat if you guys want to check it out. I don't think you should spend too much time on it, but I think one website tells you like the bad stuff about PHP and the other website tells you like the good stuff about PHP. Even though I think like the best stuff of PHP is literally on Laravel.
But um but yeah, we can also see like on this website that most of the things people really love about PHP were shipped on PHP 88. Basically PHP 8, 8.1, 8.2, 2 83.45 kind of contains the best stuff honestly. php pizza.com. What is that? Can I safely open it? Oh, there's actually something here. The [ __ ] Uh, which one? Push back. All right. [ __ ] I want to check like the new stuff on LAL prompts real quick. We have a new data table function, but we also have this new task function and stream function. PHP happiness should just redirect to lotal.com.
Indeed, dude. All right, Shad. Let's check this new stuff from Joe Tenonb. Laravel prompts 3.15 is out with a ton of new primitives that came out to build nice uh cool CLI stuff. We have this new task thing. Let's actually try to understand the API without even using it. Okay, let's go here into our resources or routes console.php. Let's actually make this a thousand times bigger. Here we go. Let's create the new subscribe command. Shad, don't forget, by the way, go all the way down and subscribe this channel. Okay, insanely important. Oh, you just made it up, dude.
Imagine if the website was something bad. I would be banned from Twitch because of you. Can you imagine that? You guys, when you guys send me links, you need to be careful. Okay. By the way, Shad, I don't know if any of you is on Instagram, but I'm on Instagram as well. Okay, here we go. That's the link. Okay, if you guys want to follow me on Instagram. Okay, so PHP artisan command subscribe. And if I see something like this info, I can just type something. This will appear on the console, I assume. Boom, boom, ba boom, bada boom.
PHP artisan subscribe real quick. Yep, yep, yep. Okay, so now we have this task thing. So I can just type use function Laravel. Oh my god, it feels good to type chat. It's been a while. It's been a while. So I've imported a task thing which I can do from all the way top and I cannot type task. Okay. What does this receives a label in the closure? Interesting. Okay. Let's type label doing something. And then I have a closure. Okay. What does that closure accept? Accepts um a call back. That's interesting. Let's actually do something on the call back.
Let's for example, you know, sleep for two seconds. Okay. PHP artisan subscribe. Oh, nice. Can you guys see it? There's like a small, you know, a small thing right there. Can you guys see it real quick? Check it out. It is a small uh like loader thing. What else did it give me? Why do you type code with bare ants? I know, dude. It just feels crazy. I'm trying to get nostalgic a little bit, you know? Just go just like back in the days like imagine like when you have kids and [ __ ] you will be like oh back in the days we used to type everything by ourselves you know.
Oh also allows you to scroll logging output. What does that mean? Logging output. What does that mean? Wait a second. What do we get here? What is this? All undefined method support logger info. Oh, this is a logger instance from prompts. Okay, I'm going to import this real quick from prompts. Okay, what do I now I get? Oh, I have label error line partial success and warning. Okay, what is this commit partial? I don't know. Let's just type line for now. Let's type hello. Let's actually sleep before that. Let's sleep for one second and then type hello and then sleep for another second and type world.
Okay, let's see what do we have. Nothing. Interesting. Do I need to commit the partial thing? I don't know. Let's see the documentation real quick. Laravel prompts go to documentation type task. Oh, here we go. So, apparently I just have to call this resolving packages downloading LL framework. Okay. I don't see any of that though. The [ __ ] What the [ __ ] How about now? Okay. I'm doing something incorrect for sure. Can I sleep before all of this? Oh. Anyone here using Laravel nightw watch preferably someone that came from bug snack uh is it as good bug snack is taking so long to operate laval 13 thinking about ditching it I don't think anything comes even close to night watch in terms of uh debugging laval apps you know you think about this man like when you think about you know data dog uh sentry bug snack and things like that those are generic logging solutions so basically you have generic logging understanding of your app.
But when you use Nightw Watch, you get like indepth understanding of your application. So it's not even close to any of that. And you will understand that real quick. They have like a free thing Nightw Watch. So you can just literally create an account and you know try it out for yourself. Is that logging to the log files? I don't think it is. I think this is supposed to actually show something on the terminal. Oh, trying a normal terminal. Oh, you think that's it? You think that's the problem? That would be What the [ __ ] I'm wondering if I need to type this thing called it commit partial or whatever.
I am so confused. Okay, let's read this. Okay, maybe I'm super confused. Task scrolling output area. You might want to use this [ __ ] Blah blah blah. Labels. Okay. Streaming task. Huh? Do you think it's the sleep making this issue? I don't even know anymore. No, no, no, no. This is not going to Wait, no. This is going to prompt support logger. What the [ __ ] are you guys talking about? Let me check. Let me go here into storage logs. No, we see nothing here. You guys see it's not going here. Is it going here? No, it's not going here either.
It's literally should have been displayed here. Okay, let me replace this by sleeping again. Oh, here we go. Can you guys see it? Oh, nice. Good stuff. Okay, so basically we seeing this stuff. Okay. Why I wasn't seeing [ __ ] That was so awkward. Okay, so basically I see pulling latest changes, running migrations, which is literally this stuff. Okay, what happens if I do success instead? I see nothing. Okay, that's confusing. Um, so pulling latest changes changes pulled. I don't see this What is the difference between info and success? Info is not even here. Huh? Did I type info?
Oh, line. Okay. I'm wondering if this is like a problem for my terminal. Let me open real quick. I term two and just you know make sure that uh I'm not going crazy. So work projects uh stream LL app PHP artist subscribe. I know you guys are not watching. Just give me a second. Okay, this is interesting. So on it turner two I see like literally more stuff but not on ghostly for some reason. So you guys see like here I see like success in warning on niterm 2 but not on ghostly and not on php storm.
Okay definitely a little bit different. So apparently like the task thing doesn't work very well on Ghostly in PHP Storm. It does work on it term 2. Okay. So on iterm 2 we have like a checkbox and [ __ ] like that. It's just so so much more rich. Oh, I can also upate the label which is very interesting. Let me actually try this one real quick. Oop. Need um need the slips. Otherwise, this is too fast. It doesn't work. Oh, it does work. Here we go. Stages. Clear migration. Clearing cache. Nice. Can you guys see this changing?
Check it out. Bam. Bam. And I will change again. Bam. So, this is the API of task which is a new function from Laravel prompts. Good stuff. Okay. Not everything is working on Ghostly, but most of it it is. Okay. Then we also have the streaming test text uh which is this one. This one will be interesting to test it out real quick. So I have this and now I can just move this inside of my command and I think we are going to see a dot appearing on screen every single time. Oops. Undefined variable words.
Wait. Oh, okay. Words equal to click on the like button. Okay, let's see if it works. Ah, you guys see? Oh, that's nice. Let's make it a little bit more smooth. This is cool stuff cuz you now you guys can combine this with an AI agent and you can have like streaming content from the AI agent straight to the terminal. Oh, nice. Can I do this? good stuff. Okay, so basically you can use a stream to be able to stream content to the terminal. I don't think we ever had this in Laravel. Maybe Symfony have this, but in Laravel we never had this.
So this is now available on Laravel prompts too. Or with a generator indeed. That's a good point. Very cool stuff here. Okay. So what else? Joten and Bow shipped. Let me see. So we have the task, we have the stream, we have the autocomplete. Uh, which I think we have seen a few cases like that on the PHP terminal Okay. Titles. Oh, this one might be cool though. Oh, allows to change the terminal title. Holy moly [ __ ] Oh, that's a good one. How do I use this? You guys see like the terminal title? Look, look all the way up.
Look all the way up. You guys see this? Oh, this is badass. So, it's basically a title. Okay. So, if I do, let me just roll back to the way we had before with the task situation because I think what we can do is equally import the title thing. So let's type use function bada bad prompts and then title. And now I can say that not only I want the label but I also want the title to be pooling latest changes and I can have running migrations and I can have clearing cache as title. Okay.
And now if I run this on my ghostly terminal, play a close attention to this title right here all the way top. Okay, I think this is the thing that will change. Here we go. Pulling latest changes running migrations. Clearing cache. Oh my god, I love terminal chat. Does any of you also loves terminal stuff? I love terminal stuff. Type w terminal because terminal will be for us forever. Honestly, I honestly think like I was developing this project called it supero.dev which is a social media terminal kind of idea and I actually went very further with the project.
Let me actually try to should I show you this? I don't think I want to show you this. Should I show you? Maybe I don't even know. Let me close this. Close this window. Oh yeah. W terminal 100%. Where do I have that? Nunaduro superdev maybe. Where do I have that? Oh yeah, it's right here. CLI. Yeah, at some point I don't even know if I want to show you this, but at some point I actually went very deep on the superdev stuff. And again, the goal is kind of develop like a social media for the terminal.
And I actually went very far with it. Like, no, I don't I don't want to show you this. I'm going to I'm going to close I already teased it enough. Okay. But potentially, like I think that is a space to be able to have a social media on a terminal. Like literally social media where you can just scroll timelines and click on like buttons and [ __ ] I think like back in the days the PHP terminal stuff was not ready for this but now there is the potentially the space to actually develop this with cloud code with Rust for the terminal and make it really cool.
Um but yeah I don't know uh maybe maybe I will continue work on this laval new AI policy for contribution. What do you mean? Oh, there is a new AI policy. Can you send me the link push back if you don't mind? Yeah, this is good stuff on the terminal. Honestly, I think there is a what? So, this is like the title thing, but it is also more stuff. I think notify sends native desktop notifications straight to the terminal. Yeah, this stuff, by the way, I'm pretty sure he's using like the native stuff from Mac OS in Windows and [ __ ] This stuff doesn't always work.
It's a good idea overall, but it doesn't always work. What is this story time? Oh, it's like an example using everything al together. Nice. Good stuff. There's also the data table thing which I want to kind of check it out real quick. Oh, this is looking sexy. Jesus Christ. Introducing data table. Does he have an example? Let me actually uh maybe we have documentation where I can just copy paste an example data table. Oh, it's not here yet. Oh, the table example is but not the data table, I think. All right, let's try it out real quick.
So, use function data table. Here we go. And then I can pass a label. Okay. Label which will be let's just type here title maybe. Oh no. This is like others already. That's a big API. Okay. Let's see label which will be my label. I'm going to start really really simple. And then we have others. Okay, which will be uh you know name, email and uh profession and then we have the actual data which will be under rows. Okay. So the first guy will be Nuno Maduro with my Laravel email and my profession will be software engineer.
Let's keep it stupidly simple and just do this. So we have a bunch of examples. Okay, I think we're good. And now I can just run it. PHP artisan. Oh. Oh, here we go. Holy moly. And this is a scroll and everything. Oh, nice. This is cool stuff. Holy sh We have a search. No way. Oh, this is very cool stuff. Shad, everyone typing WJO for this new feature because honestly, this is very cool stuff. O my god. And we have a search. Oh my god, this is looks sexy as [ __ ] indeed. And everything just works.
You guys cannot see it, but you know, if I want to, for example, go to the search, I just have to click here. And now I'm on search mode. If I click on escape, I go back to the table. And the table is like I'm scrolling through the table using my rows. This is very good. Very, very good. Filters. Oh, these filters. What do you mean? I didn't check the entire API. I see ins, I see labels, I see rows, others, required, validate. Oh, there's a filter indeed. I don't know what the filter thing is doing, though.
Woe. Come on, chat. Everyone typing W Joe. Joe Tannenbau, which was the person developing this data table function. Good stuff. I like it. I'm going to send you this tweet about this feature. Okay, there we go. There we go. Okay. And I think for prompts that's it, I guess. Yep. I think this is it. Uh, we don't have anything else here. I guess we don't we checked already this PHP sadness in PHP happiness. I want I don't want to spend too much time on it though. Yeah, I think that's it for today. [ __ ] Uh, we checked a bunch of stuff today.
We checked like lot of teams. We checked a lot of new AI skills. We checked the new features on Laravel prompts. Uh what else did we check? We checked the mouth stuff for joining the PHP foundation. We checked my new YouTube video. How become a 10x AI on this area. Here we go. How become You want to quick check Liinal? Not today. I need to double check. What is Liinal to begin with? I have heard that Liinal is like an editor like a a minimal editor, but that's the only thing I know. I honestly think this this might be super cool, but uh I think this kind of editors where you have project on the left and editor on the right are kind of dead.
Anyways, so I really want I what I'm trying to wait chat, I'm going to be honest with you. I'm trying to wait for an editor. Maybe it will be Jet Brains Air. I need to check it out. But I need an editor that only gives me like prompting and reviewing. That's the only thing I want from an editor. That's it. Artisan route list will be a good example for that table. Indeed. It's a bronzer type of editor, I think. Yeah. I don't want to spend too much time on it. It looks cool though. But yeah, maybe I will check in on next live stream.
Okay. [ __ ] That was awesome. I'm going to have dinner with family. U that was cool. Uh so again, we'll be back next Wednesday. Hopefully Wednesday we'll have another video as well, but let's see. Wednesday I'll be back. I hope you guys have enjoyed this today's live stream. I had fun. Good stuff on a lot of open source ecosystem coming out every single week which is awesome. I also have like two pull requests on the pipe. By the way, I don't know if you guys have seen but I've delivered to Taylor Otwell two pull requests which are going to actually be [ __ ] unbelievable.
Okay, the first one is the sluggable attribute. So basically just do uh sluggable from title and you get your slugs automatically on any model you may use this. The second thing I'm going to introduce to you if it gets merged is the new image processing API which is something I have equally developed where you just have to type this request image avatar and then you just type optimize and you save it and that goes from 2 megabytes to 75 kilobytes. Okay. Uh so there is a there is a bunch of stuff into this. Uh but yeah there is sluggable that is the image processing API all of that it's literally under reviewing at the minute.
It might come to Laravel in the future if eventually gets merged. Good good good stuff. Sh let's rate someone on Twitch as usual. Uh let's see who is tweeting at the minute. Hopefully someone cool doing PHP stuff. Does a sluggable does a sluggable attribute handles duplicate slugs? What do you think? Do you ever saw me doing anything that would [ __ ] Do you ever saw me shipping [ __ ] Of course he handles duplicate slugs, dude. He handles all the possible [ __ ] you can think of. It's all right, Fento. It's all right. But obviously like a bunch of the code that we have on that sluggable attribute was inspired by a bunch of experience I had on previous level projects.
So including duplicate sluggables. Okay Shad, let's see who is uh tweeting stuff on um on the software engineering category. We have people doing Linux. We have people doing C++. No PHP people today. Not a lot of people either. That sucks. Oh, thank you Sabrita. Thank you for coming today. I appreciate. Let me actually search for PHP real quick. There is someone doing Laravel stuff, I think. No, not really. I'm confused. How about Laravel? Well, worst case scenario, we search for um we search for JavaScript. Okay, JavaScript. Let's see. Oh, yeah. A bunch of people. Me dodev.
Let's rate this guy. Me do Dev. Oh, 3K viewers though. Jesus Christ. All right, Shad. Love you all. Catch you guys next Wednesday. Peace out. Boo. It hey it hey it hey it hey it hey it hey it hey it hey it hey it hey it hey it it hey it hey it hey it
More from nunomaduro
Get daily recaps from
nunomaduro
AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.









