public function listTurns($doctor_id, $limit, $offset)
{
$r = [
'doctor_id' => $doctor_id,
'limit' => $limit,
'offset' => $offset,
];
$validator = Validator::make($r, [
'doctor_id' => 'required|numeric|min:1|exists:doctors,id',
'limit' => 'required|numeric|min:1',
'offset' => 'required|numeric|min:0',
]);
}
https://stackoverflow.com/questions/29578153/how-to-validate-route-parameters-in-laravel-5