1 year agoby Ajinkya shivaji pawar
Dear Sarthak Sir, I have one question that in validation for the as per rule we write the code of $request->validate or $this->validate($request) but change to the $request to $request->all() we get the error.. and same thing happen in manually validation we use the ($request->all()) Validator::make($request->all(), [
why this difference?????
Your Student Ajinkya
$request include form data as well as many more informations about request, like headers etc.
When you use $request only, on validation it will check for parameters its-self, now if you provide $request->all this means you are providing only parameters.
So its validate method's job to find parameters from your request.