Gemma 4 Laravel Livewire Components - Does it Work?

Tony Xhepa| 00:11:16|Apr 5, 2026
Chapters9
The host introduces Gemini 4 and begins integrating it into a Laravel 13 Livewire starter project.

Gemma 4 with Laravel Livewire on Laravel 13 mostly underwhelms, but Cloud Code helps scaffold a post CRUD quickly (and sparks a useful design critique).

Summary

Tony Xhepa tests Gemma 4 with a Laravel 13 project using the Livewire starter kit and single-file components. He walks through selecting Gemma 4 in Cloud Code, generating a post CRUD workflow, and wiring routes under the post namespace. The resulting scaffold includes an index, create, and edit page with inline delete and form validation, plus a prepared Post model, controller, and routes. Throughout, he notes imperfect design results and demonstrates how Cloud Code creates and edits files to match the Laravel 13 + Livewire setup. He also highlights a minor snag: the Post model currently lacks a user_id relationship, which he then addresses by removing the unnecessary belongsTo User relationship in the model. In the browser, he tests the CRUD flow using a fake user and confirms that the interface can create, edit, and delete posts, with the slug generation logic mentioned in the update path. Finally, he compares Gemma 4 against larger models (4B vs 31B) and concludes Gemma 4 isn’t impressive for this Laravel task, while acknowledging Cloud Code’s practical value for scaffolding and reasoning about the code. The video ends with a call to explore other local models for comparison (e.g., Gemma vs Gwen).

Key Takeaways

  • Gemma 4 can scaffold a Laravel 13 + Livewire post CRUD workflow with single-file components, including index/create/edit pages and inline delete.
  • Cloud Code generates Post model, migration, controller stubs, routes, and a Blade/SFC-based UI for the post resource, all tied to web routes like /post and /post/index.
  • The initial setup revealed a missing user_id relationship in Post; the reviewer removes the unnecessary belongsTo User relationship to fit the project scope.
  • The implementation includes form validation (title, body, slug) and slug generation logic during create/update flows, with redirects back to the index page after actions.

Who Is This For?

Developers curious about how Gemma 4 performs in real Laravel 13 + Livewire projects and those wanting a quick scaffolding workflow using Cloud Code to compare model-based assistants.

Notable Quotes

"Hello friends, Tony here."
Intro by the presenter setting the video’s tone.
"I'm going to see how good is this Gemma 4 with coding especially with Laravel."
Tony expresses the goal of testing Gemma 4 with Laravel.
"cloud code is very good so if I click here cancel and if I click again okay is deleted"
Demonstrating Cloud Code’s effectiveness and a CRUD action.
"that's it all about this video and if you like such a videos don't forget to subscribe"
Closing remarks with a CTA.
"I have this 4 billion, but we have also 31 billion and maybe the 31 billion is a little bit compared to cloud code"
Commentary on model sizes and their bearing on the task.

Questions This Video Answers

  • How does Gemma 4 integrate with Laravel 13 and Livewire for single-file components?
  • Can Cloud Code scaffold a Laravel 13 project with Gemma 4 end-to-end?
  • Why would someone remove the user relationship from a Laravel Post model in a Gemma 4 workflow?
  • Is Gemma 4 effective for Laravel tasks compared to larger models (e.g., 4B vs 31B)?
Gemma4Gemma 4Cloud CodeLaravel 13LivewireSingle File ComponentsPost CRUDLaravel RoutingTailwind UIWeb Routes
Full Transcript
Hello friends, Tony here. Welcome. In today's video, I want to try this uh gamma 4 from Google and I'm going to try this with the Laravel project. I have prepared Laravel project which is right here is a Laravel 13 with the live wire starter kit and I'm going to see how good is this Gemma 4 with coding especially with Laravel. I have download and here I am inside this GMA Gemma 4 project and yeah I have downloadama and also this Gemma 4. Now I'm going to open the cloud code because if you want yeah you can use the cloud codeex open code also open cloud and yeah to use cloud code we can use lance cloud and choose a model or just like this because I have the gemma 4 installed and this we can choose here okay so on the list here we have also more which is gemma 4 and I have a 4 billion so let's choose this I'm going to use this and all feature MCP servers in this project and now what I want to do is yeah you can see also here Gemma 4 is just a create a CR with Laravel 13 and using live wire single file component is just a simple project so let's say create let's say a post cut using live wire for single file component and I want to be sure to use the page components. Okay, use page components for index create and edit pause. Okay, I'm going to hit enter. Okay friends, so here we are back now. This is completed but is not completed. I'm not impressed with this one. So to summarize, here is the implementation plan summary. Mod migration requests done. Controller done. Live wire components UI done and testing test files are in place. Manual execution is required to confirm passes. And as you can see here is the implement postcrat using liveware for page components. First set up initial post model migration and form requests. Then implement post backend logic controller service. I said I want to use the live wire for single file components. Anyway, build postl web page components index create edit and then write and run best test for postcrat but here it said the testing manual execution is required to confirm passes and if we open this project first in the web php we don't have any route for the post grat next if you go up here models we have the post model we have filable title body slug then we have a belong to a relationship to the user but we don't have a user ID then if we see database migrations post assuming a user ID relationship exists where exist that here needs to exist okay next you can go up here and see on live wire we have just actions Then we have HTTP controller. We have post controller which is a CR controller resource controller but is empty just the methods index store show update destroy. Okay. Next in the live wire we have post and we have a create post class. Okay. Validate only updated pass in the fields. Edit post rules mount post is not imported here is imported this update post request which is not used. Okay, I'm going to go back and I will copy here the prompt and I'm going to exit from here and I'm going to open the cloud code. Okay, I have a subscription. I'm going to paste it right here and then I'm going to hit enter. Now the cloud code is going to see we have post migration and models and it's going to see what's need to be changed. Okay friends, we are back with cloud code to say all done and files created and modified. You can see has created inside the resources views pages post the index blade sfc page list post and inline delete also create the create form with validation edit form prepopulated via mount method factory with title body and auto slug and also in the web routes has added three routes. So routes under out verified added also on the sidebar the postnab item and 12 pass tests covering all crowd actions. Okay, so we have routes / post post index create and so on. Let's see on the web we can see we have the route live wire post pages post index and named post index also war post create and post edit. Let's open this post index. We have the method to delete and the render is going to add post post by 10. Okay. And here we have the table and so on. Okay. Let's see the edit post post is imported. Yes. Sync title body validate require string validate string and max 255. Then on the mount this post able with post and post title and body to say post title post body. We have a save validated first using the this validate post update title body and the slug and saying validated title body and then added a slug saying str slug validated pass in the title. Okay. So it's going to create also the slug and then redirect to the route post index navigate true. Here we have form the create is going to be the same. Create a post validate required and require string. So the same save validate create title body slug and redirect back I think. Let's see now also the database migrations and we have title body and the slug. Yeah, the same no changes here on the post. Yeah. And we have here belonger to relationship which we don't need because we don't have a relationship with model with the user model. Okay. Here but anyway I think cloud has just see we have post with and body and the slug and use them. Anyway let's see on the browser if we refresh let's go and register with the fake filler. go to pose and maybe let's come here. I'm going to open this in new tab and I'm going to run the composer rundev. Okay, so this is not working the design. I'm going to ask cloud code to fix this. The post index needs to fix the design and also remove the relationship method from post for the user. So the post index needs to fix the design and also remove the relationship method from post for the user. Okay, let me check the dashboard and statics page to match the design pattern. Profile is going to check the profile. Okay, so you can see all pass here. So post model remove the user relationship. Okay, and index page design fix. So remove the flux main replace the row heading with also added an improve state and tighten column with w- n /3 and not so much of the rounded excel border and we can see here is changed okay we can go to new post let's see if I just say create post we have a validation let's work the fake filler not and here we have we can delete also we can edit by saying just dot dot dot update the post and we have dot dot dot here cloud code is very good so if I click here cancel and if I click again okay is deleted and also if I just show you if we go to post yeah the relationship method has been removed okay friends that's it all about this video what I wanted to show you using cloud code with the Gemma 4 local model. But yeah, it's I'm not very impressed with that. Maybe we need more a large model because if we see here, I have the 4 billion, but we have also 31 billion and maybe the 31 billion is a little bit compared to cloud code. But as you can see, they are well suited for reasoning, agenting workflows, and coding. But with Laravel at least Gemma 4 was not very good. I have this 4 billion which is 9 GB but yeah it was not what I expected. Okay friends so that's it all about this video and if you like such a videos don't forget to subscribe like and comment if you want another local model to compare both local models. So for example Jimma and Gwen. See you in the next one. All the best.

Get daily recaps from
Tony Xhepa

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