YouTubestream· Oct 18, 2025· 56:01

Let's Make Some Videos (Form Components, State of PHP, Giveaway App)

Watch on YouTube ↗

transcript

121 moments
  1. Music

  2. so

  3. Thank you.

  4. so

  5. Thank you.

  6. you

  7. All right, what's up everyone? I am trying something new. Hey Francisco. Good to see you here I'm trying something new. I want to basically just Do my work in public if that makes sense. I have a couple of videos that I want to make um this afternoon my afternoon, my evening uh, so I've just figured I would do it live with you all and try to get into this process of doing this more

  8. being able to do it live in front of people makes it a lot easier for me because i can do two things at once so hopefully i can one not leak too much information but to uh be able to do this with you all as well so um yeah if you're joining thanks so much for for being here uh hopefully trying

  9. to do this at least like three different times a week i'm hoping to do like a monday wednesday friday kind of thing um that doesn't end up working out then i'll just end up doing it maybe once a week twice a week i don't know but the cool thing is the goal is for me to record videos and you i guess to watch or just to hang out with you uh so yeah glad to have you all here

  10. Camillo, good to see you here. Hopefully you're doing well. Hopefully you're doing well. I know you can see what I'm typing too, but I figured this would be great to kind of just have this process. So I have a couple videos I want to make for Laravel, but then also for my own channel as well. And yeah, just get things up and running and figure out why I might as well do it live

  11. kind of thing. So hopefully I can get into a little bit of a rhythm, a little bit of consistency. So that way people are expecting it too, because I know that's the, that's the big key. As long as it's consistent, then people are going to start hanging out. So I'm hoping to do this every Monday, Wednesday, Friday at around this time, 1 30 PM onwards kind of thing and live on Twitch,

  12. YouTube and X. So yeah, I'm gonna go ahead and check out, see which videos I have up and coming. um

  13. let's go ahead and see so i'm not gonna like hopefully for those just for those joining hopefully it's still kind of entertaining and still fun for you i got a new uh camera angle

  14. actually right over here a little behind the scenes camera angle so you can see i guess what i'm doing as i'm doing it um which is always always fun i guess in a lot of ways uh but yeah um i should make that its own separate scenes i can jump to that like if i'm if i don't want you to see anything on the screen or anything like that but yeah i am wanting to uh record some

  15. videos and then kind of just walk you through the process or just you see the process of what how i record videos how i think through videos um so if i pull up my kind of notes here these are the ones i want to record at least like these three it'd be nice to record these three in the next couple of hours um one for laravel inertia form component and then uh maybe like a building component so

  16. building a random lottery machine for giveaways would be awesome and then it'd be nice to react to the state of php survey i think that would make a good video as well i remember taking that survey but i haven't looked into the results just yet so that would be fresh for me as well and the And the cool thing is as I'm streaming, my whole setup is exactly the same as when I'm recording. So there's not going to be too much that changes from my perspective and hopefully from your perspective.

  17. The only downside is I'm not going to have any fun music for you. So if you're here and you just want to kind of put it on in the background, I'm fine with that. Like hopefully it's entertaining enough. But I'm not going to have any music going for that. I need to actually pause my music just in case it doesn't go in there. But let's go ahead and see what we've got set up here.

  18. Yeah. So I think we'll start off with the inertia form video. So typically when I'm making a video, I kind of do a little bit of research, just kind of outline in my head of what I want to emphasize with this. uh so if i pull up my screen here i know that there was in the starter kits uh starter kits

  19. inertia form component i think there was yeah there was in the starter kits kind of a while back yeah here we go because the form component for those who are just watching this is kind of me talking through so that i am outlining or detailing at least in my head of what where I want to or what I want to emphasize with this video I'm imagining and

  20. this is where I can kind of take notes for this particular video I'm imagining maybe like a five minute type video so there's not going to be too much to talk about this it's going to be more of like this you used to have to write forms in this particular way with inertia and this is the way that you can do it now so uh what you used to have to do and now what you how easy it is i guess

  21. would be the outcome um for those in the chat if you're in the chat uh let me know if you've worked with inertia since the release of the form component what are some things that like it just made it super easy and then what are some things that you're you it's not hard but uh it was maybe Maybe it was easier before, or maybe it's just different now that you have that form component. I know the form component doesn't detail for every single use case, how easy it is.

  22. And then maybe just a quick example. So at its simplest, the form component behaves much like a classic HTML form. And so this was the initial pull request for Inertia.js for the form component. but there's there's a great pull request that i'll have to find within the laravel starter kits

  23. where it jumped from the form as a non-component to the form component so i'm going to see if i can find that let's go ahead and see maybe it was back here

  24. okay yeah here's a pull request in the react starter kit yep pr utilize this is what joe tannenbaum did so i believe let's go ahead and take a look at one of these files so this is what i want to kind of emphasize in this video as i'm making it is like it so we went from a

  25. form with the method of post on submit of submit with all these labels inputs everything like that to shortening this up rather significantly because you don't have to do any of this id name password all this kind of thing value even you don't even have to do um you just have to put in like the id and or i think it's just the html4

  26. Maybe it's the idea as well. Let's take a look. So in forms, so form action, and you can pass it whatever that place is. We'll do React. Actual slash users, and then you just have the type and the name. So it is just the name. Just give each input a name attribute and a default value, if applicable, and the form component will handle the data submission for you. So yeah, it makes it a lot easier from what it used to be,

  27. where if you were doing a full form, you would have to have the value and that value would then be this whole data password prompt submit. So now you just pass a specific name of the password. You have a name of confirmed password. So this is what I want to emphasize in the video

  28. is one how easy it is now and then two um i guess just what what the process is to change it so if you had an older form uh so i can put that in my notes um quick example of refactoring that might be a good thing so five minute video so the intro is going to be something like um

  29. I think forms are everywhere in the web. You kind of have to have forms to do anything. So I think that's going to be the hook for the video, if you will. You kind of have to have forms to do everything. Forms are everywhere on the web. And so the premise is in this video, here's what forms in inertia used to look like.

  30. and here's what they look like now. So we're going to go from this to this. Maybe it can be a quick this to this. Let's find out why and how. Perfect. Yeah, for those just joining, if you're joining up, let me pull open the chat real quick. If you're just joining, what app are you using to write notes? This is actually linear. So I'm using linear as my,

  31. I guess this is how I kind of keep and I my all of my video ideas and then like what I do for the next day week or however I get to it but most of my notes are actually in reflect that's the note app that I use so yeah Josh hey think first how's it going

  32. Good to see you. For those just joining, I am kind of trying something new. I'm trying to build out, I'm trying to try a new process where 99% of everything that I do in a video, I can do live. Like my whole process of switching scenes, like switching the camera angles, that kind of thing. All of it happens live anyways.

  33. So I figured why not make, why not stream me making videos? So I'm going to pull a note from, I guess, the Theo playbook, if you will, where might as well do it live and have people watch and follow along and maybe learn something hopefully. And hopefully it's not too weird. I do a lot of retakes as I'm doing videos, so hopefully that part's not weird. But Camillo, I think for me, using the Wayfinder has helped a lot with the forms. That's a good point.

  34. I don't know if we use Wayfinder in the starter kits. Actually, I'm curious. Does anyone know a way... Can I use a starter kit before this form component? maybe let's go ahead and see because I basically wanted like pull open the starter kit of what

  35. this used to be before the form component I wish github let's go ahead and view file I wish github would show me the old component um maybe this is this would be it let's see let's delete user confirm password register let's do this

  36. so this would have been the old version of the file yeah we have form method and i don't think we were using yeah we weren't using any thing so why don't i pull open we'll create a new Laravel app and go ahead I think I need to set my PHP version because I was using a different app before

  37. PHP 8.4 will be fine we'll do a Laravel new and we'll call this inertia form we use the React starter kit we'll do the built in authentication so we can look at what that new form component looks like. And I think that would be the premise of the video. It's like, how did we do this before with the old form component, or the non-form component, I guess I should say.

  38. And then here's what the new form component looks like. And maybe I'll grab, maybe I'll find, maybe anyone else knows in the chat, if you know of a specific, I don't know, a specific, open source project that uses inertia that might not have the new form component it'd be interesting

  39. to to pull that up i know ping crm i don't know if this is up to date yeah nine months ago so it'd be interesting if we were just like refactoring this that might be an idea inertia js ping crm Let's go ahead and let's go ahead and clone that. inertia.js ping CRM.

  40. CRM composer install. We'll go ahead and NPM install. and then phpr is in key generate oops phpr is in migrate now we don't want that we need to

  41. copy that now we can migrate now we can generate perfect All right. Funny note, for new Laravel applications, there's an easy way to get this set up and running. There's a new Composer script with new Laravel applications. We probably have it in the inertia form, one that we opened up.

  42. So in the Composer JSON, on it should be like a setup yeah this new this is a new script you can pose or install it does everything that i just did by hand without having to do it by hand uh but obviously i mean i could have copied in just on that um but yeah so i think the first thing is let's do a let's let's get this

  43. one let's do an intro for the form component and then maybe we'll do a what you used to have to do how easy it is quick example of refactoring i like that keep it five minutes um funny enough when i'm recording usually like a five minute video i probably have like around 35 to 40 minutes of content that i usually have to cut down a lot of that is mostly me just stumbling over words

  44. or if i'm or if i um i'm figuring out how how i want to type something or say something or that kind of thing for this one i want to be a little bit more polished um hey josh remember me prith parash good to see you how are you i remember you uh mr manafon oh composer is json now not yamloth i'm old uh are we what are we planning on breaking today hey carl

  45. um yeah i'm trying something new today i am making videos and recording them live on stream um and so the goal is to um the goal is to be able to kind of show the process of what what i do to make videos but then also just have a easy way of making videos with you guys watching um hey mr

  46. man of fun glad to have you all here uh i use view wayfinder was added in august to view start kit. Okay. Perfect. I think wayfinder is in the new starter kit as well. Um, and yeah, Carl, it is awesome. Hopefully it's not too weird. I'm not going to have any like music going. Cause like my whole process of recording videos, like everything that I do is live anyways, I don't do too much editing other than cutting things down. So hopefully it's not going to be

  47. too too crazy um why would that be weird uh because i i i i when i record videos it's a little bit different than when i'm talking to you but um yeah the whole the we'll jump to this so that we can record that intro yeah my whole process my whole flow of recording videos

  48. nothing changes when I'm live streaming. So every camera switch, every, um, you know, every scene is the same when I'm recording videos as it is when I'm streaming. There's nothing that changes. I just pressed this little record button. So, um, yeah, it makes it a lot easier. Oh, I also did add a little behind the scene camera.

  49. um that was that was a new edition uh mr marathon thank you love parallax yeah it's a little slider so it's hard to see on this shot on this shot it's a slider that goes from left to right so it kind of so as i'm talking it makes it look a little bit more cinematic um but it's also just i like having motion while i'm recording videos so for especially for like intro shots or like marketing

  50. shots, I guess. But, um, yeah. Uh, Tilly, glad to have you here. Um, yeah, definitely remember you. Emmett, busy guy today. Uh, hopefully, hopefully not too busy. This is more of like me trying out something new so that I can kill two birds with one stone, be able to, um,

  51. record videos while also sharing the process live with you glad you remember me as well of course carl you're you're a twitter mod or twitch mod i don't know i said twitter casey murator it is right um the funny enough sliders like automated sliders are not that

  52. expensive. So it's, it's, it's super, super fun to do. Okay. Let's record this. Um, so inertia forms press record.

  53. Oh, we're getting some stuttering. I haven't actually tried recording while I'm streaming, so I think it's slowly catching up. We're not actually dropping frames. Are you all seeing this stuttering, or is it just on my flow? I think I know why it's stuttering. We'll go ahead and stop recording.

  54. is probably because it's probably because of source record. So we're going to change that. Remove source record there.

  55. remove source record from here we're going to that should be better let's see if i have any other source records going close that one out

  56. I do not source record that one. Okay, so a little bit of technical to get to with these. It is stuttering. Yeah. It's funny because I wasn't actually dropping frames. I think it was the encoding that was dropping frames. But good to know.

  57. So I think it's because my recording process, I haven't tried it while streaming. But my recording process, I record my video separately from this, I'll call it like the collective shot or the final shot. And I'm guessing you and Will talking about building stream tools. I'd love to watch how you approach building something like that with chat aggregation stream overlay.

  58. it's funny because I uh I did I am still thinking about this process like I think I think that it's needed like I have my own setup with OBS that works great but if I don't need to bring something into this and plop it in it's a process good night Prith Farash glad to have you here okay let's try that again let's see if the recording um I'm going to rename this one and delete it just for now

  59. because that was stuttering. Let's see if the recording for this one is any better. Now that I removed source record, or at least I think in OBS, if I hide source record, I think that stops source recording. But if not, I'll have to change that. Let's go ahead and try again. Recording. Okay, I think we might be good.

  60. no stuttering good I don't necessarily need source record you guys can keep me yeah looks like we're good right now so it was the source recording which makes sense if I'm streaming I don't necessarily need source record because like you all can tell me if I'm missing like oh the only reason I use source record is because

  61. Because every now and then I'll record myself in screencast mode. And I'll be hiding something with my camera that I don't realize I'm hiding. I haven't done that in a while. But every now and then it's nice to have just the standard video shot. But I don't use it much. So I don't think I need it right now. And I'll probably find ways. I'll optimize the source record. So that way we're not stuttering.

  62. Um, Josh is just vibing now. Um, and then everyone, this is my, this is my wife. She's on, she's on the live stream and looks like my dog is very confused by this live stream. Um, sweet. I'm recording still. So this is start of the form component.

  63. So if you think about anything that you do on the web, you're probably interacting with forms in some way, shape, or form. Forms are everywhere. You can't really get around having to build with them, having to use them. So when you're building with Laravel and Inertia, forms become very handy to know that they

  64. can be easy to be used no i think the first part was good um but i want to switch into building with inertia um making it easier so when it comes to building forms with inertia there's a new form component to make every single process that you typically do when building an out

  65. So when it comes to building forms with inertia, there's a new form component that inertia has that takes everything that you typically would do within building out a form and just makes it simpler, easier. So why don't we take a look at what that looks like. So why don't we take a look at how you used to build a form with an inertia and how this is so much easier.

  66. so why don't we take a look so why don't we take a look at how building forms used to work with an inertia and how this new form component is so much easier all right we'll go ahead and pause that felt pretty good um so yeah i uh after i do the the intro is usually the hardest for me because it's

  67. it's coming up with the right words to say and I don't script it out. Everything is a form, even HTTP. That's true. And then it's just cutting it up and making sure that's right. Sometimes I have to redo things if it doesn't sound good. It was okay. Well, I guess okay is good enough. um but now i want to take a look at

  68. i think we need to show what forms used to be and then we can show it so like going from all of this

  69. and let's go ahead and pull this up in the new version so we'll pull up the main branch and we'll pull open the same file register.tsx

  70. resources js pages uh auth register.tsx to this it's not very flashy because there's it's it's still shown

  71. so maybe i wonder if there's an old version of the forms that it shows too without the form component i don't know if we do form helper i guess this this is fine we can show this so i zoom in here yeah so i'll unpause this

  72. So this form component is available within Vue, React, and Svelte, and it takes your forms from looking like something like this. password remember

  73. to something like this

  74. perfect now we'll probably jump into the screencast and probably this is where we can run through the current starter kit so we'll pull open that we have inertia form

  75. um sometimes i use vs code for video sometimes you just use zed we'll use zed it's react looks a lot cleaner so i'll use the register.tss txx link and this is where i'm probably going to talk about

  76. how you don't have like it's all just handled in one method now whereas before you kind of had to abstract this method out i think that's the big win is not having is condensing everything I guess for you in the chat what is the big win

  77. what is the big win for you all what am I missing what's the big win for you all um okay goodbye girls my girls are in the chat um live coding while streaming live coding while live streaming oh yeah live coding while live streaming is a big one inertia for the win this is freaking awesome i love this i'm learning so much about doing videos well thanks camilla

  78. i'm glad i'm glad it's helpful uh it's it's a little bit different for me but not too much in the sense of like i don't usually talk through as much it's very silent between takes for me because i'm just thinking through it i'm not sure yet how to see well hopefully that can help um so i think if we pull up zed and we'll say let's go ahead and jump into screencast mode

  79. now the example i'm showing here is within the react starter kit now the example that i'm showing here is within react within inertia but the same form component exists within... I kind of already said that. Now the example that I'm showing here is for react within inertia,

  80. but the same premises exist. Not premises, but more examples. Same techniques. Follow along. Now I'm going to be using React with Inertia for this particular example, but you can follow along within Vue and Svelte as well.

  81. Everything really boils down to how a form component condenses everything that you used to have to abstract. Now what do I mean by that? the starter kit is a great example for how you might use these kinds of components and as

  82. the starter kit is a great example of how you might use components as well as wayfinder actions to shrink everything to condense everything to make this a little bit more the starter kit is a great example of how you might use form components as well as wayfinder methods to take everything that would have taken up a little bit of space within your

  83. own components and condense it all. So that way, instead of having to have a form method and have that on submit method handle all of your data, the form component condenses it, pushes it into this component itself. With the Wayfinder method of being able to have this registered user controller store form, we actually have a Wayfinder video all about what this particularly means in itself.

  84. The inertia form component then says when everything that exists within this form, in this case we have an input with a name, we have an input with an email, and then we have an input with a password. Within Inertia's new form component, all you have to do is make sure that there is a name attached to each one of those inputs, the values that you would like to pass

  85. into the form submission. The component then takes that and whichever method or whichever route you are passing in, again this uses Wayfinder methods or just particular slash route.

  86. And it's going to take all of those inputs, all of those values, and push it to that particular route.

  87. So you can see here, this is a Wayfinder method for the registered user controller. Okay. Within the store method, let's go ahead and find that. We validate information, we create a new user, send a new event, and then log in that particular user. With Wayfinder and with this new form component, we're doing all the hard work of capturing

  88. state data of passing it to a particular route, validating it, and returning it all within one single component. So it's nice to see how this could be easier for you now, right? Especially if you're using a starter kit, the hard work is already done for you. But how did this used to

  89. look and how can we maybe, but how did this used to look and how can we, what's the word I'm looking for? Refactor. But how did this used to look and how can we refactor an existing form within inertia to make this easier for you and for anyone else who comes after you having to read your code?

  90. all right i like that we will go next i think to probably look at ping crm i think that's a good way to do it let's take a look at the docs to make sure i'm not missing anything within the form component we might see josh's php rockstar thank you deno glad to have you here uh man if

  91. on i love the php ecosystem because php react combo like this was quite hard to wrangle back in the day nowadays i probably do it if it has a form it has to be reactive that's react has to react on both back in front so this trap is why i'm trying to escape by watching this video well hopefully i can convince you in a little bit ways uh the biggest one that you might begins is um wayfinder i think wayfinder is the better i guess premise for a lot of this as well you know i'd

  92. love is setup of how do you got zed working in php world yeah it is it is a little crazy it's my zed when you're using inertia zed is a lot better when you're um like blade with live wire it's still not the best but i still like it because i've gotten it set up with prettier and stuff um how do we get joe t to build a level of zed extension i'm actually thinking about learning

  93. how to do that uh but yeah let's go ahead and take a look so within forms there's not too much because we talked about name i guess i can do a cut here when i'm refactoring a component

  94. I'll maybe try to find an easy component to refactor within within ping CRM. If not, I might just build one out myself, build out a particular form, and then refactor it. I wonder if I still have

  95. I wonder if I still have my forms. So I did a video within Laravel maybe a year ago. Forms. Forms in Laravel.

  96. I'm curious if I can just this is going to be not the best way of doing this though because dashboard

  97. components maybe this is what did i do i had like a journal entry for my thought i don't know where that where that went

  98. dashboard yeah add journal entry form profile partials why did i put it in there this is when you're like okay i i didn't i didn't necessarily need all this profile partials add journal entry form I mean, this is a great example of

  99. how much easier something like this would be because you don't have to do any of this. Cut off this form event handler with the post route. And you take out all this too. This is like the state of summary notes rating, for example. but let's go ahead and pull up ping crm

  100. let's see what this looks like resources js pages um i have not actually looked at this is in view that's okay Create.

  101. A view with the script at the bottom too. Okay. So we have all this data from form this.inertiaForm. And then we have method of store. store this was written six years ago that's crazy so we would take

  102. out i might know this this might be a little bit more too complicated to refactor maybe I will do the my old form version

  103. now it's going to be easier as I'm thinking through it's going to be a lot easier for me to just like write this from scratch within a newer version of inertia than trying to have to update it and then do that so i think i'll just talk through it as if i was writing it from you know

  104. from scratch before maybe i'll take this

  105. do a two-step checkout form it's a very good litmus test for formal libraries a two-step checkup arm that is good that's a good one um i i am always

  106. and it's good to get all of yours but it's all it's always interesting to see how much i should do within a singular video of like how much do we build or do i build it and then you see the final outcome kind of thing and see what that would look within it um but yeah let me go ahead and

  107. let's go ahead and pop that open

  108. Thank you.

  109. okay

  110. Josh having a blank page problem live on screen. Blank page problem.

  111. Um, yeah, I haven't, I haven't, uh, I haven't, I haven't had a problem. Uh, I have a blank head problem. That's probably what it is. I'm trying to decide of if I build out a full featured form or if I keep it simple of like, hey, this is what you would typically create in a form.

  112. Like if you are saving some type of data and start from that. I'm debating if the refactoring is a good call because if this video is talking about the form component in particular, if you haven't used inertia like you, Mr. Manifon, then it'd probably be a better idea within the video to talk more about like,

  113. okay as you're building out this form here's the things that you can do within the within the form component so that's what i'm thinking through right now so let's do that let's go ahead open that up and let's just start from scratch let's go ahead oops

  114. and in the dashboard let's clear this out let's add a new form and

  115. do I want to do that? Hmm. Yeah, comparison refactor might make it too chaotic. I agree.

  116. I think even just a simple form like this. So maybe I'll do that.

  117. We'll go ahead and...

  118. or an ID. Perfect. We'll say this is a string text message and that should be good enough for now and then also creates

  119. a controller and we'll say this is the chirp controller PHP, others in migrate.

  120. So in our chirp controller, let's go ahead and have this store method and we'll go ahead and validate it. actually we probably don't need to I always hate how

  121. PHP and Telefense usually sucks with that particular thing so if we have our registered user controller I just want to grab most of like the same stuff as this.

just you here