🔴 Open Source Dev Stream: New PR, Pint Features & More

nunomaduro| 00:57:07|Mar 14, 2026
Chapters6
Nuno greets the audience, checks in with the chat, and explains that the stream will cover open source work and live coding interactions.

Nuno Maduro unveils Laravel Pint updates (auto-imports, comment-removal) and a shiny new sluggable attribute, plus live dev talk on plans for image optimization in Laravel 13.

Summary

Nuno (Nunomaduro) streams live from his open-source tip jar, showing off two new features in the Laravel Pint ecosystem and teasing a bold new sluggable attribute. He demonstrates Pint’s ability to automatically import all classes and strip unused comments through a new rule—PHP dot type annotations only—available as an opt-in in Laval’s Pint docs. The chat is lively as he walks through the rollout in Laval 13 projects and confirms how to test changes locally. Then he pivots to the star of the show: a fresh sluggable attribute that can generate and manage slugs directly on models, including options for unique IDs and multi-column slug sources. He showcases how slugs translate across languages and emoji, and discusses potential defaults like whether updates should alter existing slugs. Throughout, he solicits community feedback on test coverage, backfilling existing records, and how to handle route keys in generated slugs. He also hints at a simple, driver-based image optimization API for Laravel 13—intended to be lightweight and pluggable (with GD by default and Cloudflare as a driver option)—to handle avatar uploads with optional cropping and WebP output. The chat swings between feature talk, code demos, and planning sessions for future improvements, including where this image API should live (Foundation vs. Image package) and how to balance simplicity with extensibility. It’s a practical, idea-filled session for Laravel developers who want real-world, quickly-implementable improvements.

Key Takeaways

  • Pint now offers fully automatic class imports and removes unused comments via the PHP dot type annotations only rule, as shown in Laval’s internal tests.
  • All-new sluggable attribute lets you generate slugs from one or more model columns and supports unique IDs injected into the slug formula.
  • You can backfill existing records with a dedicated command (e.g., backfill post slug) to populate slugs where they’re currently missing.
  • Route-key and slug behavior are discussed at length, including whether the route key should default to slug or require explicit model methods.
  • Word-of-mouth feedback from the stream indicates strong demand for a validation rule (sluggable) and for optional update behavior on slug changes.
  • The open-source plan also includes a lightweight image optimization API for Laravel 13 (driver-based, default GD, with Cloudflare as an option), aimed at avatar uploads and WebP support.

Who Is This For?

Laravel developers and PHP engineers who want practical, ready-to-use enhancements for Laravel Pint and model slugging, plus a glimpse into upcoming image optimization tooling for Laravel 13.

Notable Quotes

""every single useless comment from your code will be totally removed""
—Nuno explains the new Pint rule PHP dot type annotations only and its impact on code cleanliness.
""All my starter kits will ship with this""
—Nuno references the new sluggable feature being included in starter kits.
""The slug will translate across languages and even emojis""
—Demonstrating the internationalization and robustness of the sluggable implementation.
""This is shipped already, by the way. Is merged is shipped and obviously is an optin""
—Status update on the Pint feature rollout and its opt-in nature.
""You can backfill existing records""
—Discussion of a backfill command to populate missing slugs.

Questions This Video Answers

  • How do I enable PHP dot type annotations only in Laravel Pint?
  • How does the new sluggable attribute handle unique IDs in slugs?
  • Can I backfill slugs for an existing Laravel 13 project with a single command?
  • Should route keys default to slug automatically in Laravel models?
  • What would a lightweight image optimization API for Laravel 13 look like and how does it compare to Intervention or Spatie packages?
Laravel PintPHP type annotationsLaravel SluggableSlug generationBackfilling dataRoute key behaviorImage optimization APILaravel 13Open source live streams
Full Transcript
Black. Light fight wah. Wonder baby. Hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey. What's up, Nuno Nation? How everyone is feeling today? Welcome back to the live stream. Excited to see you all today. What's up, Tik Tokers? Nice to see you all. How everyone is doing today? Today I have an exciting live stream chat. I'm cooking some stuff. I'm cooking some stuff and I want to show you everything. Joanna Kanito, what's up, dude? Vick, how you doing? Nice to see you. Ju Steve Keeping, how you doing, dude? CVT, what's up? Doaurus, how you doing? What's up, Kick? How everyone is feeling today? Twitter people, how everyone is feeling? All right, chat, today will be exciting. Okay, I've been cooking. I've been cooking a bunch behind the scenes and I have some stuff to do and this all of this is open source. So, let's just just let's just stream it. You know, you're cooking. Oh, dude, I'm cooking. I'm going to tell you that. You're just not ready for what I'm about to show you. Okay, I don't even know where I should start, man, honestly. But yeah, back from the gym. Uh, you know, just excited for another beautiful Friday. What's up, Praa? Nice to see you, dude. Thanks for saying hi. How you doing yourself? How was the week so far for every every single one of you? Good week so far. Is everyone happy? Weekend is coming. You know, I'm going to visit a beautiful friend during the weekend. So, just just happy, man. Just happy. So much energy. Thank you. Thank you. Just happy to be here, man. All right, let's go. Let's go. Let's go. So, what I do have to show you, I have to show you a few things, man. I have to show you a few things. So, first of all, do I want to start by this? Yeah, I'm working on this sluggable thing. We are going to end up working on something else. But I want to show you. Should we start with this? All right, let's start with the less exciting stuff. Okay, let's start with the less exciting stuff. So I have shipped already two features on lot of alpine. Okay, two features on lot of alpine. Let me show you the first one, the least excited one which is probably is exciting. I think it's a good feature but you know it's a it's the least exciting one. Okay, lot of alpine just released uh yesterday with a new feature and what it does is like actually my pull request is a little bit better than this article. Let's actually show you the the pull request itself. I think the pull request is a little bit more sexy. kind of explains everything. Uh yeah, so what it does is that in the past you might actually end up in your code with qualified imports and non-qualified imports. Okay, so if you run pint if you run composer up plate you run pint and it will have automatically just everything imported. Okay, so this is the first the first thing I want to show you. Okay, and this is the least exciting I think. Yeah, sluggable we are going to get into that. Are you sick just Stephen King? I'm sorry to hear that. What's up, newcomers? How everyone is doing? People are popping in, man. I love it. I love it. W Pipal, hi Pu, how you doing? Nice to see you, man. Agent, what's up, man? I have a few things I want to show you today. I want to I want to kind of have your taste, you know, to see what you feel about the stuff I have been cooking. So, this is the first thing I have cooked during the early week, you know, um at the beginning of the week. So, basically just imports everything in your codebase. We have run this internally at Lavel and we had great results and a lot of cleanup was done in the various projects we have at Laravel. Obviously, this was a lot of work as you can see just pull requests all over the place because we wanted to make sure that all of the stuffs and everything is just perfect. Okay, so this is the first thing I have shipped this week. I also have another thing that I want to show you which is already shipped but it's not tweaked yet. So top secret situation. Okay, so this is the second thing I have cooked during the week and this is actually very exciting. Okay. All my starter kits will ship with this [ __ ] I can I can tell you that. All right. So, it's documented already, too, but I don't think it's we haven't tweeted about it. I think we are we are going to probably tweet about this next week. So, if you go to the pint documentation, which is under packages, pint, we have added this beautiful new feature under under rules, I think. Oh, the music is so on fire, man. All right, here we go. So we have cookie this new feature which is called PHP dot type annotations only. Okay, and what this does is remove every single useless comment from your code. So every single useless comment from your code will be totally removed. Okay, and we can we can test that in a second uh on this Laval project I have here. But uh in theory, if I'm going to show you the pull request itself, like every single pull comment like this will be removed. And honestly, I have seen, you know, over like 95% of the reactions on Twitter, they were like so good. People were super happy about this because they wanted that. Um, there was some AI experts who said that these comments are actually useful and [ __ ] like that. Just, you know, um, I don't know, man. Uh, I have the feeling that the AI is very familiar about all of this stuff like registered, heated, and [ __ ] like that. They don't need this stuff. But, you know, you let me know. Pipal is saying, "You tweeted it." Yeah, I tweeted it but it was like an idea, you know, wasn't like definition, you know, like literally done. So yeah, the sluggable thing we are going to talk about that in a second. Deminars, how you doing? Jeff, how what's up, dude? Welcome to the live stream. Nice to see you all. Oh my god, I need I really need to be careful about my wording. Every single time I say a bad word, uh, Tik Tok instantly puts my live stream as more airrated almost. Sabriita, how you doing? Bruno, what's up? Why not transform a single line uh into a single line doc lock? Well, that's a new contribution you guys can do. Tom, how you doing? Nice to see you, man. But yeah, this is shipped already, by the way. Is merged is shipped and obviously is an optin. Okay, is an optin because it will remove every single comment. It won't touch any configuration folder. So just to give you the perspective like this is if I'm not mistaken a Lavl 13 project. Let me just double check. PHP artisan d- version. I get 13. Nice, nice, nice. I type. Do I have pint here already? Yeah, I have pint. So if I were to open this, let's go. Let's let's actually do that so I can show you. I'm going to create a new pint.json file. Just like that. Easy peasy lemon squeezy. And now I'm going to go to the documentation and I'm going to just simply copy paste this. Okay, just copy it. Bam. Done. So once I copy this, I think now I can run pint against this project. And this will do a bunch of stuff. Here we go. A bunch of stuff. A bunch of stuff. You guys seeing it? Okay, you guys seeing it? And now we are going to review the changes and you are going to see how beautiful this is. You should send me 10 bucks every time you say a bad word. I'm sorry. Please say Jesus Christ. Jesus Christ. Swagi saying from Tik Tok the only king in Laval. Thank you. Thank you. You are too kind Tik Tockers. I'm going to be honest with you. You guys are too awesome. All right. So, once we do this, technically there's no many there is no more changes. Here we go. And GitHub will give me this is not the correct one. One second. Uh do I have this project here? I don't. Let's just add local repository. Uh, where do I have this? Oh, under streams. Here we go. Okay. This not is not a git repo. Oh, [ __ ] That's a problem. Okay. Uh, one second, chat. One second. One second. I'm going to just remove this laval folder. I'm going to type composer create project laval 13. Of course, it doesn't work. Give me a second, chat. Give me just one second. I'm almost there. Uh uh uh uh uh uh uh uh uh. So now I'm going to go jump into this Laval folder. I'm going to type gin init I think. Let me just confirm. Yep. Yep. Yep. G init git-hip- m whip. Yes. Yes. Yes. G add. Let's whip it. All right. This is done. Now I can add it to my GitHub UI. Try now. Yep. It worked. And the last thing I want to do is add again this to this project which is done. Okay, we're back to the game chat. We're back to the game. So now I can do again this drill of adding a pint.json file and just copy this deal. Come here. Bam. Done. And then I'm going to run pint once again. And this will just do. There we go. And finally I see everything here. Okay. So this is what happens with your project once you run against that rule. Okay. As you can see, all of the comments that you don't need are going to be removed. I think this is fantastic chat. Honestly, I think this is awesome. What do you guys think about this? Very fast. Well, it's expected. Pint is built on top of PHPCS fixer which is already fast. Plus, there is parallel parallel linking. So, you know, um kind of expected. Okay. Moi saying, "I'm migrating my big project is using code igniter into Laravel." Wow, that's a big migration. Pyapal is saying you should not remove the the double dash components. Maybe you know what maybe what we can do is potentially add that as an optional thing. What do you think Pro TV? Thank you so much for the rate 30 36 people walking into the live stream. For those who don't know me, my name is Nun Maduro, PHP and Laravel developer. I love everything I do under the PHP ecosystem. You guys can, you know, if you are literally just new, you can check my YouTube channel. I have a bunch of stuff there. A beautiful YouTube channel over there. And uh yeah, just you know, getting some work done. Today we're going to dive into three things. Okay, I'm going to first of all show what's new in the Laval Pine project. And we have two things that are new. The first one is that now we fully import every single class in the project, but we also remove every single useless comment like this. Okay, so this stuff is out already. It's fully optional and you have to opt in using this new rule which is documented at laval.com already. And what else? Uh there is one thing I want to show you which is if you want to preserve a comment, you can actually do it by starting uh using this note thing. So if I go into for example let's say web.php, if I have a very important note, I can use this robot situation and this will preserve the note. Okay. Okay. Okay. Okay. Oh, okay. I have worked with Coke PHP and Wii framework. Yes, with both actually. Uh my very first PHP framework was actually E framework and I loved it, you know. Hey Mike, how you doing dude? Nice to see you. Welcome to the live stream. But yeah, so this is the pine situation. Now let's move into the exciting stuff. Okay, let's move into the exciting stuff. So, I want to show you what I've been cooking for the past 2 days and what I am planning to do more and you guys let me know what you guys think. Are you guys ready? First of all, this is top secret situation. Okay, so don't forget don't share this online anywhere. So, so this is what I've been working on. Okay. Uh, not this this one. It's called it introducing the sluggable attribute. By the way, this is a bug on this title. This is an attribute, not a trait. And what it does is that you can just run PHP artisan makes sluggable post. Okay. And it will automatically add the attribute sluggable just like that. A beautiful attribute sluggable. And then if you run something like post create uh with this title, you'll get a slug like this automatically. And that's it. What do you guys think about this? Boom. Boom. Boom. Boom. You ready? CVTML. That's so awesome, dude. That's so awesome. from Stony is saying the following. Please tell me you didn't burn it. How do you What do you mean? What do you mean? Yeah, Sluggable. I think it's a good idea overall. Um, you know, I know this stuff is good because I wanted this stuff forever. Literally, you know, I wanted this stuff forever. Okay, we have a few questions. We have a few questions on the chat. Unique slug. That's a good question. And the answer is yes. Meaning that if you were to run, let me just show you. Let me just show you. Okay, if you were to run something like this and then you just go below and you do the same the same stuff, this slug will be dashed one for example. Okay, so it will just work honestly. Uh we have a bunch of experience with slugs at Lafell because we simply need all this stuff all the time and uh I was just you know very sure about the implementation. That's awesome. I know I know they get started on a DB indeed. Um, so actually one of the goals of this live stream is actually test this stuff like locally to see how it works. I'm going to give you just an overview of what I'm thinking and what I will propose to Taylor next Monday. But uh you guys will let me know what you think and if there is any adjustment we can do. Uh but yeah, so first of all uh let me just show you a few things here. Automatically we'll just pivot uh this slug generation to one-2-1. So all that stuff will just automatically work. uh there is a migration created behind the scenes. You just don't have to worry about that. Uh what else? What else? What else? Um I want to show you just a few things that are important here. So in terms of configuration, we do our best to actually understand the column you want to generate the slug from. Um so if you are in the post table and there is a title, this will be automatically just inferred from that. Um if you have a name, you will have the attribute uh with the from name. Okay, that all that stuff just works automatically. Okay. Okay. So, great question from Prata Madev is saying the following. What if uh we can use unique IT EU ID as addition for the slug? Uh, can you elaborate a little bit? I think I know what you mean, but I want to make sure I know what you mean. Okay, great question from Git. Uh, what how are the slugs for non-English characters? Okay, are you guys ready? Are you guys ready? Watch this out. Just watch this beautiful thing I have I have done. So this is some examples of slugs on the various dialects languages in the entire planet. So if you use emojis it just works. If you use stuff like this it just works. If you use special characters like this it just works. If you use you know characters that I don't understand it just works. So basically what I do behind the scenes is that I translate the language to English and then I sluggify it. That's TLDDR. That's a TLDDR. For those who just arrived, my name is Nun Maduro, PHP Laval developer, and today I'm literally showing you some of the open source stuff I've been doing and I will actually be proposing this to the team next Monday. Uh we talked about the new rules on Laravel Pint, including one that will remove all of your comments uh in your project. So this stuff will be tweeted hopefully next week. But now I'm working on this sluggable trait which really just works. Okay, great question. Okay, we have a bunch of questions here. So, we just talked about the non-English characters and as you guys can see just works. The second one is uh how do I add a unique ID? So, what you guys can do uh and that's documented as well on this pull request. By the way, this is the pull request. If you guys are enjoying this feature, just go there and put a thumbs up. Okay, here we go. A thumbs up on that feature cuz it's important. Okay, it's important. Now, one question you may have is how do I add the ID uh to the source as well? So, what you can do is just do this this feature right here, which allows you to have a slug from two columns at the same time. So potentially uh if you want to add the ID to the title what you can do is uh on the post article you can do from and then you can have ID and then title in this if you use this what would end up happening here is that you will see an ID or the EU ID and then dash the actual title. Yeah, obviously Spy Sluggable had a bunch of good ideas, you know, but um I think you know I think this pull request is a little bit well it's in a little bit better than the spasi implementation but you guys can choose you know you don't have to go to for this one. So, but spasi we love spicy at laval. Okay, we love it. So, you can literally prefix uh the given ID if you just pass an array here. Okay, that's another thing I've been uh I've worked on. What else do I have? So, that's the from using an array. What else we have? Uh you can obviously specify the column where the slug needs to exist. So, for any reason you don't want the column to be slug, you can literally just come here and just use a different column. Okay. You're welcome, Bruno. How long did you cook? Uh, this was two days, I guess. Maybe one day and a half. Yeah. I mean, you know, um, in every single project I have used a bu I have used building with Laravel, every single one of them, they had slugs. Every single one of them. Okay. Just every single piece of a lot of project I've developed had slugs. That's what I think. Okay. Now slugs may have a scope. This is something else I have done which is you know you might have a team ID or you might be within a team and you want to have multiple scopes for example. So all of that just works as well. You can customize a bunch of stuff like if you want to have slugs be modifying automatically on a plating which I don't think is a good idea. Uh, but you can modify the separator as well. The language blah blah blah blah blah blah blah blah blah. So all this stuff is customizable. Now I'm going to actually send the pull request to Taylor this way and I'm going to ask Taylor how far should I go because in my opinion like if I were to for example migrate the cloud Laravel cloud code to this sluggable trait there is a few things that are missing. Okay. Uh the first one is the validation rule. I kind of wish I could go to the from source and just have the sluggable validation. Okay, so you give me a name that needs to be sluggable like the the output of that name needs to be sluggable somehow. If this get merged, yeah, this if this gets merged, this will be a lot of valve 13 feature. If this gets merged, it would be neat if we have the new closures for attributes in here. So I have intentionally not done it but it's it's something we can add without making a breaking change. Is that a way of customizing the new slug in case of collision instead of dash one? Well if there is a collision will be just dash dash two you know. So potentially what do you Oh yeah uh potentially we're going to accept a closure. I don't think I'm going to do that right now cuz I feel it's a little bit too edgy. But you know who decides? Taylor is will this be first party? Well, yes. That's that's the goal. Stony is saying, "I love spicy packages, but anything I don't need the package is a winner in my book." Yeah, that would be one last composer require Dev Phillip. Yeah, I would love if you could just have that feedback here on the pull request. Just add that feedback here on the comment and potentially like um you can try to fix it. Actually, there is a bazillion tests on this code. So, I don't I'm not concerned if anyone does a pull request on this one. So, I've added like a bazillion pull requests where they are a bazillion tests. I mean, oh, is it here? Oh, it's here on this diff, which is huge. Yeah, as you guys can see, there is like a test for every single bit literally for domains, for Spanish, for German, like for literally everything. Thank you. Thank you. I also think it's a great feature by the way. Just happy about this. Okay. So, what else I want to show? Yeah, I want to show you just what I'm thinking and then you you guys let's do the following. I'm going to say what I'm thinking. I should add more to this feature and you guys will rate from one to 10. I'll think how how much you think that should be on the feature. Okay. So, let's start with the first one validation rule. So basically I want to add you know you have for example a form request where the input will be name and the name might be you know needs to be a string needs to be required and I want to add something called it sluggable that you can have into that name array validation and what will that do is that make sure the given name or the given titable can be serialized into a sluggable so that's the goal what do you guys think from 1 to 10 I think this is necessary otherwise people will have to do them by themselves so but you let me All right. From 1 to 10, how much do you think this is necessary? By the way, Shad, meanwhile, don't forget, go all the way down and put like on this live stream, okay? If you're having fun today, we have close to 100 people watching. That's awesome. Awesome. Awesome. Awesome. All right. We see a nine, we see a six, we see a eight. So, I I understand that you guys are saying this is a good to have. basically a good to have. Yep. Yep. Okay. That's a 78. Okay. 67. I see. Is a 67. I see. All right. Second one is route key equals to true. So in theory, in theory, you know, you are within your model. Let's say you are within your user model. You come here and you do sluggable. Okay, so that will just work. Sluggable. Just like that. Slugable. What the [ __ ] I'm doing? Slug. Yeah, this is the attribute. I'm confused. What the What the [ __ ] Oh, here we go. I just had like a you know when you do are they happen to you when you guys just forget things like you're working on something and then you just forget like it just feels weird on a keyboard. Anyways, so you do sluggable. Now, if you want like the route key to be the slug itself, what do you have to do? Well, in theory, there is two options. Option number one, you can just come here to the bottom and you see something like public function get route key name I think and then you return slug. This is the option number one. Okay, option number one. Option number two, you go to the web.php PHP file and what you do is that you just do user double columns slug. Okay. Now in theory and I mean in theory I could just come here and do this route key equals true or something like that. Okay. And this will just automatically do that for you. But I feel like honestly it's not that many characters that you have to type otherwise. So I am maybe like I don't know feels like a good to have but not like super necessary. All right. From 1 to 10, how much do you feel this is necessary? The route key situation. And meanwhile, Chad, don't forget, click on the like button all the way down. Okay? Super important. Okay? Super important. Insanely important, chat. All right. CVT is saying 10 because that way you don't need to set it globally. I know, but it just feels like, you know, I don't know. Oh, you actually like it. It should be It should be the default. No way. I don't think everyone wants to do that. No way. Would be the default. Oh, really? People nine eights and [ __ ] like that. You guys are nuts. Oh, what's happening with the Wait, what? What's happening with a with a YouTube chat? like not every single comment is appearing on the the thing. Puel, can you write something again? I don't think your comments are appearing here all the way top 32 the creator of the PHP store extension. Oh, it is working now. I don't get it. What you what are you doing exactly? All right. This is potentially a thing I'm going to do. I'm not really sure yet. Okay. I may do it. I may don't do it. I I feel like I really need tailor feedback and it will be back next Monday. Okay. What else? Back fill existing records. All right. You guys told me that potentially this will be Cumberbone to add to existing projects and I think that's true. Honestly, I think it will just take a little bit of custom code to be able to add this to existing projects. So, I was thinking about developing this thing. Let me just open terminal real quick. What do you just do? PHP art and sluggable double columns backfill post. And this will automatically fill every single post that is null. Slug post that is null. So what do you guys think about this one? This is a must. All right. From 1 to 10, how much do you feel? Yeah, these delays that's expected. Yeah. That's a 10. All right. Oh, wow. Okay. People really love this one. All right. I'm gonna I'm gonna edit the the pull request real quick and tell Taylor that people really loved this one. All right. One second. So, let's edit it. Let's go all the way down. Um, on my stream, people really loved this one. Okay. So, that said, hopefully that will help um Taylor thinking that this is a good idea. Yeah, because I feel like people will want to use this, but at the same time, they want to have like automatically those slugs be populated, you know? So I feel like this also brings the opportunity of kind of if for any reason you want to a new way of generating slugs and you want to just populate the entire table again. We could have some an option for example just reset or whatever and it will just backfill like everything from scratch even if exists already. You know automagic is good. I feel you man. I I love automagic things. How much people love automagic things? Type yes on the chat if you do. Auto magic for the win. I love it. Happy Friday, Peak and Flow. How you doing? Welcome to the live stream. Nice to see you, dude. Trippy is saying maybe a follow-up pull request. Yeah, I think there is the potential of I think what Taylor will tell me is that there is a few things here that 100% sure need to be potentially uh future work basically. you know, we'll save so much time. I feel you. I feel you. I agree with you. Honestly, I agree with you. Okay. All right, Shad. Let's talk about the last thing we need to do, which is potentially set the updating equals to true. Okay. So, by default, and you guys let me know what you guys think. Okay, this is highly controversial. Okay, highly controversial. So, you have a post, you create the post with that slug. All right. Now, what do you think it should happen if you do this? Uh, like if you just say something like, "Hello, Noo-Noo Nation." Like, what do you think it should happen to the slug now? Like, if we were to show the the slug again, what do you think the slug the slug should be? This is a very hard one to decide because I feel like we are going to see people on the community saying that this should not like change the slug. the slug should remain uh because the slug might be used in like some sort of uniqueness thing that needs to be there forever. But there is people who also think like oh no actually I think it should change. So here's just a question of defaults. Okay, should this be like hello noodle nation or should be hello world? Still hello world. What do you guys think? It should be time based. Hey dude, not like not timebased. Come on. That would be like even more mind [ __ ] Now it is optional. So you know you can go to the to the attribute situation and say on a plating true. You can literally do that already. So you just go here and you do on a plating true. The thing is that here is just previsiting the defaults. Okay let's see what people are saying how WordPress do it. So WordPress is more complicated because WordPress allows you to change the slug on the form, you know. So you have the title and then below the title you have the slug which you can customize if you want to not automatically, you know. This is a 10 for you. Okay, thank you. Yeah, it just feels like some people are saying Nuno Nation, it should be just Non Nation. It's just for me it feels like it might be a little bit problematic, you know. So I think I'm going to keep I think I think I don't know honestly this is like a 50/50 for CEO bet exactly like you are assuming as well that the this will be used in a rail it probably you know will be the most use case but I don't know man I honestly don't know it should not change exactly I also think that honestly but um but yeah so TLDDR um I just put this like at the very end revisit briefs and potentially change you on the play through. All right, Shad, here's the link of the pull request. Again, if you find this useful, make sure you put an emoji with a thumbs up. That would help a bit. Do you have comments? Not yet. What if someone uses soft elites? Uh, this is already taken care of. Already taken care of. Although, I may have to add a comment here. Yeah, I'm going to add a comment to say uh check if uniqueness well actually give the option give the option of making soft deletes not uh well I'm going to just say talk about soft deletes because I will know what this is about. talk about soft deletes. So the thing about soft deletes is that currently if you have an article which is soft deletable, you delete the article, the second slug with the same title will have dash one will be a different slug almost. Uh that's expected but maybe like the user wants to make this optional. That's the thing changing could break things. That's why I think this should not be the default option updating it. mode stable true by default in attribute uh and can set it to false. I don't know. All right, shad. Uh this is what I have been up to. This pull request is a little bit in pause right now. Uh Cal is working on it. I can show you a little bit of the code but uh you know we have a migration stub, we have a command, we have a bunch of stuff. What else we have? We have the sluggable attribute. The code on a model itself is kind of super easy to change. is very very very very quick. As you can see, we just have this bootable protected function which if your model have sluggable with add a few hooks basically. I think this is awesome. Uh what else we have? Oh yeah, we have the sluggable attribute which is just a regular slug. But yeah, easy peasy lemon squeezy. What else we have? So today I want to work with you guys in a in a new thing. Okay, so I have this project I've been thinking let me just do something real quick here. Uh, let's just add g add and do a git reset hard. Let's go to main. Here we go. I want to add lot of val boost real quick to this project. Let's actually do that. Composer require a boost. So, you can have boost here. And well, actually, do I want boost here? We don't need boost here. Give me a second. I actually need to change this to uh the framework project. Meanwhile, sh don't forget go all the way down, click like on this video if you're having fun. Also subscribe to the channel if you haven't done it yet. If you subscribe to the channel, this number right here will go up. Bam, bam, bam. You know, you see 64, it will be 60 65. All right, I need to exit this. Um, I need to close this window. I need to open the framework project, which is on Laval 13. Let's actually do that. I'm going to make sure I don't have anything here. I don't. Um, I'm going to change here to the framework 13. All right, perfect. This goes here. This goes here. Uh, ghostly. It's here as well. PHP storm goes to the end. Okay, I need to change this. One second. Almost ready, shed. Almost ready. Uh, okay. All right, shed. This is what I have to show you today. I've been thinking about another feature for Laravel 13. So pretty much every single project I have worked on at Laravel had file uploads. Okay. So users may be able to change their avatars. And something I noticed is that well in the community you have a few alternatives for this, right? you have spicy media library for example. But like I feel like for the simple case of avatars or profile icons or you know this kind of small scenarios that you may have using a media library is like using a bazooka to kill a small insect. So it just feels too much and um I want something really simple that already fits my code and the only thing it does is optimize a given image. Okay. So if I were to explain you this in small terms, what I'm looking forward developing today is this simple idea of having receiving the file upload via request layer um in you know getting like the avatar or whatever and then being able to optimize the given image. That's the only thing I am thinking of. This is the only thing I want. I want to be able to optimize the given image just like that. Okay. Now I also want to be able to corp the image. So if the user is sending me an image which doesn't look like the aspect I'm thinking of it will just automatically corp it into some sort of cool thing you know so maybe we optimize and then we corp it for example. Okay and finally something else I want to do is that which I still have to decide is that I want to be able to optimize it on the webp format. Okay this is what we need at in our project at laval. Okay we need a simple method that allows me to optimize the given image and we need to be able to corp it. That's it. That's the only thing we need and I think like 95% of the projects just need this. That's it. So, um, so what do you guys think about this feature? Okay, because I feel like the current alternatives in the community. Of course, we have like we could use uh intervention intervention like the the thing from the community PHP which is potentially what we are going to end up using for this by the way. Uh, but you know it's a package you need to import it and then it's just different. You need to consider where are going to put these things are going to be a service blah blah blah blah. So we wanted some sort of building API that just do something like this easy peasy you know massive W. Thank you. Thank you. That's a thousand right? Yeah I feel I felt the same you know u I felt the same when I was pitching this idea to the Laval core team. I'm going to code it right now. So you guys if you want to stay for the next hour or two, this is what I'm going to do for the next hour or two. Okay. Potentially like 3 hours even for the next hour or two we are going to code this feature together. Yeah, I think like most of the community so what's happening today on the community is that we have people using the intervention stuff but again the it's a good package but like you need to import the package you need to understand where are going to put this package and there is like it's not driver based so you end up you know uh it is driver based but you end up using only PHP extensions and um but yeah there is this package is obviously the spy media library which honestly feels like a bazooka. It's like a bazooka to kill like um a just small problem which is just optimizing in webp. So you know that's why I want to build this basically cvtal is saying table string slug unique after ID. What do you mean? Why not at the end? Well, you can customize the migration is a stub, dude. You know, all right, Shad, from 1 to 10, how much do you think this is useful? I think this will be just fantastic. And something we need to consider though is that I know that intervention is driverbased and we need to find a way of using cloudflare to do this. Okay, chat. Do you guys want some music today or should we just keep it simple like this? Say yes, music or no music if you think having music on a live stream is a Does he handle videos? Well, I was not thinking about handling videos. A lot of people saying no music and music. Yes. Oh my god. It's always a confusing thing. Okay, so for those who have said yes, uh do me a favor, just put music on Spotify for yourself. But I'm here I'm hearing some very very nice music right now. Oh, you start learning PHP. Congratulations. Welcome to the community, dude. You are going to do fantastic, man. Music is nice. Yes, yes, yes, yes. No for music. Yeah. So the goal of this like we are going to quickly just go to cloud code and start you know crafting this plan. But the idea is having potentially an image.php which can be published and what you have here is a driverbased API. So just like in Laravel you have all this if you go to cache for example you can customize how images should be optimized how cache should be used and whatever. So this will be driver based by default will be potentially GD but you can just come here and do cloudflare for example and get some really nice cloudflare optimization of the images. Uh so that's the goal you know uh you can use image as well. So that's kind of the goal we are going to do today. All right you guys ready? It's time to go shed. Let's actually go to cloud code and start cooking this [ __ ] All right. All right. Let's start from scratch. Let's go to the terminal and type gad- p and reset hard. Okay. Let's do that first. Let's type g check out-b feet uh image. That should be enough. Image optimize. Actually, well, let's just do image for now because I have the feeling that this will end up being way more than optimization. So, let's actually do that. All right. We have the the pull request. We have the branch open. Uh, what else we need to do? So, this is clean. Let's go to cloud clothe real quick. Let me close this window. Let's type clude skip dangerous permissions. I always forget the [ __ ] command that it's just insane. Claude, skip dangerous permissions. That's what I want to use. Here we go. So, we don't have to say yes all the time. Here we go. All right. Let's start with the plan phase. Again, with cloth, you can literally shift tab and change from plan mode to just go ahead. And we want to be in plan mode before actually executing the plan. Okay. I would I think like every single thing used in the image optimization space on the PHP world is using intervention. Cloudflare image driver. So, Cloudflare offers you a service that allows you to optimize images, but does it in a very clever and good way, actually. Let's [ __ ] go. Oh, yeah, baby. Oh, yeah. All right. So, let's think a little bit together. Uh this is the Laravel framework and as core maintainer I have the duty of developing this new API for optimizing images. I was thinking about something like this. So you see request you have is this image directly? I don't think it's image. It's still file right. Let me just confirm this real quick on the LL documentation. Laravel docs file uploads. Pretty sure it's just file. We don't have even even an image method. Uh so request yeah it's just file. Here we go. So at the minute we just have file basically. So here what we can do is just do uh potentially image avatar optimize. Do we optimize before the corping? Let's actually see if intervention offers anything like that. Intervention PHP. Okay. They kind of do the final optimization at the very end. Do I want to do it at the very end? I think so. Yeah. All right. So, I was thinking about something like uh corp and then optimize and then being able to specify the format which will be a p. Okay. So, I think we want this. What do you think about for PHP? I haven't seen it yet. I think have the potentially to be good, but I haven't seen it yet. How do you send the optimized image to S3? Uh, well, that's that's done already. That's with Laravel. You just use the store thing. You know, the store allows you to just select where you want to store it. And if the one of the stores is S3, that will just work. I was thinking about something like this also. this needs to be driverbased potentially on top of intervention, but also opening the space for using other services like Cloudflare. Okay, we have this. What else we need? Um, I'm going to just say the following. Start simple and go step by step. Maybe only have those two features for now. Okay, just really starting simple. So, let's let's have cloud clothe cooking this for now for us. We'll just cook a plan and then we are going to find it out together. Okay. The standard format should always be FP. Well, I agree with you. You know, I think WEBP is just a standard on image optimization. There is no point of starting on PNG. I agree with you. Totally agree with you. Every single time I worked on image optimizations, I always end up using um WEBP basically. Okay. Every single time. Now I think there is a question here which we are going to have to ask ourselves and maybe like we can discuss it while cloud code is doing the plan thing which is the following. Let me just open here a new scratch file. So at the minute we have stuff like illuminate mail. We have illuminate um notifications and all this stuff is driver based right even the cache one like if we just use illuminate cache this is you know you have radies you have memcached you go here you have various options and you go here you have various options in theory we could go to illuminate image because we equally have you know we have various options as well um but at the same time. I don't want to kind of overengineering it for now. I really wanted to keep it simple. So potentially what I was thinking is that we just add this to the illuminate support and it will be alongside array string and image. But it definitely feels too much to be here cuz image is already a little bit like uh big or too much big to be on support. So I don't know. What do you guys feel about this? Let me know in the chat if you guys think this should be illuminate support, illuminate image or illuminate support. We can also think about illuminate foundation potentially. So on foundation actually we can have some sort of image folder and that could could do it for now, you know. Yeah, Bernu Bruno, that's what I was thinking because I feel like images are such a big topic and I'm like very very confident that this thing will grow up in the future. Yeah, to resize this but also like to be able to work with images like if you go to Verscell for example, they have their image component for example. Um I think pretty much every major framework have it at the minute. I don't think this this should be a separate package for sure because it should be on the framework because every single web app leads with applica with images like literally. So you guys think that potentially this could end up being a facade as well? I don't know about that. I don't I'm not sure about that. I'm not sure about Let's do the following [ __ ] Let's do the following. Let's potentially do it right now on support with or on foundation. Let's actually do it on foundation keeping in mind that potentially this might be moved on to illuminate image. Okay, let's do it on foundation for now. Uh so have a you know some sort of um illuminate foundation image thing with something in mind that this potentially will end up being migrated to illuminate image which is very likely to to to be done. User is saying oh yeah yeah eliminate image I think I think we'll be end will end up being eliminate image for sure. Oo yeah you know yeah let's start for now with image u just just with image.php PHP and you know kind of work towards that. Okay. All right. Let's see what cloud code has. Cloud code is still cooking like going through all the image architecture and kind of planning it a little bit. Yep. Yep. Yep. Yep. Yeah. The goal is keeping it simple. You know, we want a very simple implementation of a image class that allows you to optimize One of the first very first questions people made when I've, you know, talked a little bit about this feature is that they wanted to immediately ask how about video and [ __ ] like that. Why not open code? Ask that to David Hill, dude. just go and ask David Hill why I'm not using open code. All right, let's see what we have in terms of um plan. All right, so image processing API context. Laravel needs a driver-based image processing API that allows developers to manipulate images files fluently from form requests. The initial scope covers crop and optimize. So we want to keep it the scope very simple for now with intervention image v3 as default driver for accessibility services like Cloudflare. Target API. So target API we do request image corp optimize format webp. Um I'm not sure about the name it parameters here by the way. I think we are going to end up changing this because I really don't like the auto completion that this offers. Have you guys used like name it arguments like this and also felt that the auto completion that you get is not just perfect? What do you Sylvia is saying uh there's already a package that does that. I'm 100% sure that is bu 300 packages that do this. I'm going to still do my own. Okay. So, let's just get over that. Yeah. Here I think we are going to potentially end up using not this API and something like webp directly you know because this API could be let let's actually brainstorm it together real quick this API could be potentially this uh let me show you so we have two options here this could be option one this which could still work honestly option A this Or why not? Or why not? Just this. Option B. Just this. Which one you prefer the most? Option one. Option A or option B? Type on the chat. Oh, this P is weird. Let's just do this. Option A or option B. Chat. What do you guys think? Because we could just do this and this will offer some level of auto completion which is a little bit more sexy. What will the optimize function will do? Oh, that's a great question. Oh my god, everyone is asking like what the [ __ ] optimize will do and I can explain you. Two webp that's a good one actually. Two webp maybe. Well, a lot of people saying option A as well. That's a good Well, by the way, for those who are not familiar what optimization is, is like so a problem that end up like what is the problem? The real problem behind all of this is that you want users to be able to upload a four megabytes picture, right? At the same time, you don't want to you don't you don't want to store it as four megabytes picture, especially if you just want to just [ __ ] have an avatar, you know? So, what you can do is transform that image, optimizing it, and that will be like from 4 megabytes to 100 kilobytes. Okay. So that's the that's the entire goal of this feature. That's why we are developing this. Okay. Most people prefer the option A. Let's just keep it then. But that's this is the problem we are trying to solve. Okay. Users want to upload a 4 megabytes picture because they don't want to like you know have to optimize them themselves. At the same time they don't care how we are going to use the image. But we can optimize it. That's what Instagram and you know Twitter and everything they do this streaming is lagging. Oo that's a great question. Chat is the streaming lagging for anyone else? Let me know. Type yes if it's lagging. Type no if it's not lagging. Your cam is lagging. That's not good. Oh [ __ ] All right. Okay. Should I restart the stream then? All right. I'm going to restart the stream. Okay, chat. I will be back in two seconds. Okay. Stay there. Why is it lagging though? That's weird. Okay, I'm going to restart the live stream. One second. Uh, how do

Get daily recaps from
nunomaduro

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.