As you know Laravel 5 changes the way you call the validator
, the old way is calling the validator facade
, but now there is the ValidatesRequests
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',
]);
}