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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners