Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions app/Http/Requests/StatisticsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,20 @@ public function authorize(): bool
// authorisation done on a per action basis using Grapher::Graph->authorise() in the controller
return true;
}


/**
* Prepare the data for validation.
*
* @return void
*/
protected function prepareForValidation(): void
{
$this->period = $this->query('period');
$this->category = $this->query('category');
$this->protocol = $this->query('protocol');
$this->type = $this->query('type');
}

/**
* Get the validation rules that apply to the request.
*
Expand All @@ -62,4 +75,4 @@ public function rules(): array
{
return [];
}
}
}