Answer the question
In order to leave comments, you need to log in
How to access the field after validation in the controller?
Hello, in the controller, after validation, you need to access the value of the field that passed the validation.
public function editRequestProduct(ProductsRequest $request, int $id){
$validated = $request->validated();
// 1 вариант $slug = $request->slug;
// 2 вариант $slug = $validated['slug'];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question