Source: medium.com

Laravel Forms 101

Category: Laravel

I need to admit, I always have to look up how forms work in Laravel. So consider this blog post a quick overview — and a cheatsheet for myself in several months. Here is how a simple form with one input field, say a fullname, and server-side validation looks like.

I use TailwindCSS together with the form plugin to get a decent UI with minimal extra markup. To get your form working, you need to catch the submission.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners