Skip to content

Commit

Permalink
added the prepareForValidation() into the requests. Commented by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisma committed Aug 26, 2020
1 parent 52eae99 commit 06d515b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/stubs/request.stub
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ class DummyClass extends FormRequest
return true;
}

/**
* Prepare the data for validation if the data comes in json format
*
* @return void
*/
/*
protected function prepareForValidation()
{
collect(json_decode($this->data, true))->each(function ($row, $key) {
$this->merge([$key => $row]);
});
}
*/

/**
* Get the validation rules that apply to the request.
*
Expand Down

0 comments on commit 06d515b

Please sign in to comment.