1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 21:34:03 +00:00
laravel-tips/content/tips/use-the-requests-flag-when-creating-models-to-also-create-form-requests.md
2021-11-12 18:43:31 +01:00

648 B

title tweet_id thread_slug author_username images created_at slug
Use the --requests flag when creating models to also create form requests 1459206741703356419 weekly-thread-2021-45 taylorotwell
https://pbs.twimg.com/media/FDxOtKdWYAUmMwr.jpg
2021-11-12T17:09:32+00:00 use-the-requests-flag-when-creating-models-to-also-create-form-requests

This release of Laravel also includes a "--requests" flag when making models via Artisan. This option will create a "Store{Model}Request" and "Update{Model}Request" form request + update the controller to use those requests on their respective methods. 🔥

Thanks @PovilasKorop!