Skip to main content
Wafy's Tools

Main navigation

  • Home
  • About
  • Framework Learning

Breadcrumb

  1. Home
  2. Updating my PHP Framework Knowledge.

Laravel - Creating and storing Chirps

By Jeff , 28 May, 2026

This lesson was about forms and storage. Not sure how I feel about the way forms are created in Laravel. I am a little spoiled by Laminas, in that they use form objects to generate and validate the forms. Laravel seems to let you create your form in the view and then in the controller you can validate the form. While this is just a small amount of code, I am not sure I like it. It is very simple to add validation and even customize the messages.

In Laminas if you want to create a custom element, you need to build an object for it. Then you also need create a view object for it as well and link them. While it is a pain, it can be nice. For example in my DynaBallot app I build the forms in objects that are dynamic so switching between the different types doesn't take much. With this, I would guess I would need a component for each of the forms and have an if statement for each type. While it is doable I am not sure how messy the validation will get. Though it does make sense that some of that logic is in the view.

I like that it handles CSRF for me. It is just a simple line in the form. No extra logic needed in the controller or any place else. Which is nice. From the sounds of it they even have a way to rate limit inputs and some other features you can add for forms.

It is a bit of a paradigm shift for me on this. Even as I write this my head is going through how to change my DynaBallot app to utilize this. It would be a rewrite if I did use this, which I think no matter what that will need to be done.

Going to call it a day and pick this up tomorrow. The next lesson looks to edit and delete chirps.  

Taxonomy
Javascript
PHP

Book navigation

  • Laravel - Creating and storing Chirps
  • Laravel - Edit and delete Chirps
  • Laravel - Getting Setup
  • Laravel - Our first model
  • Laravel - Showing the feed
  • Laravel - What is MVC?
  • Laravel - Working with the database
  • Laravel - Your First Route
RSS feed