[00:02] if you need to automatically set user ID from authenticated user? There are at least four ways I will show in this video. Option number one, probably the most straightforward. You have the validated array and then add another [00:14] item to that array. Option number two, similar but with different PHP syntax. Instead of adding the item to the array, you use dot dot dot universally called splat operator to merge those two arrays together. The third option is to use has [00:28] many relationship of eloquent which is user then it has many posts and then create the data that assumes that in the user model you have post has many option number four is to set that user ID not in the controller but in the model [00:43] itself or similar would be eloquent observer so booted method creating event and then you set that user ID. Keep in mind if you're doing that in the model or observer you need to double check if that session o even exists because [00:57] controllers usually check that in the routes or in the middleware and in this case it's global things. So that may come from a Q job from artisan command or somewhere else. So add if statement to check the o and I ask my audience [01:11] which option do they prefer. This is the tweet and the result of the poll is option C with eloquent relationship is chosen by 43%. And also people replied with their own options. So Will is explicitly setting [01:24] the properties. Punopal is creating Laravel actions and Humbberta is voting for DTO's. So this is one of those cases in Laravel that there are so many ways to write the same thing which is a blessing and a curse at the same time. [01:38] What do you think? Which way do you prefer?