From 77410ed71f783867addcf1efc0cbeb368d78f54e Mon Sep 17 00:00:00 2001 From: Johan Montenij Date: Mon, 27 Mar 2023 13:51:39 +0200 Subject: [PATCH] Added an example for using Splade FormRequests --- form-builder-overview.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/form-builder-overview.md b/form-builder-overview.md index 12bbdf7..3b1d476 100644 --- a/form-builder-overview.md +++ b/form-builder-overview.md @@ -222,6 +222,15 @@ class CreateUserFormRequest extends FormRequest } ``` +Now this class can be used as a regular FormRequest: + +```php +public function store(CreateUserFormRequest $request) +{ + $data = $request->validated(); +} +``` + ### Extending Form classes Instead of providing the class name, you may also use an instance of the form using the `make()` method. This allows you to add additional fields to the form: