Last active
August 7, 2021 23:50
-
-
Save j-tap/4f3fb4b79c494fe96957fe64a8538e06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Manual call to UserRequest validation | |
| $userRequest = UserRequest::createFrom($request); | |
| $validator = Validator::make($request->all(), $userRequest->rules()); | |
| $validatedData = $validator->validated(); // array | |
| // Modify field in request | |
| if ($request->filled('telegram')) | |
| { | |
| $request->merge([ | |
| 'telegram' => ltrim($request->input('telegram'), '@'), | |
| ]); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment