fork download
  1. <?php
  2.  
  3. Validator::make($rows->toArray(), [
  4. '*.device_id' => ['required', 'integer', 'exists:App\Device,id', Rule::unique('prices')
  5. ->where('device_id', $rows['device_id'])
  6. ],
  7. '*.price' => ['required', 'numeric', 'min:0', 'max:16777215'],
  8. ])
  9. ->validate();
Runtime error #stdin #stdout #stderr 0.02s 24696KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Uncaught Error: Class 'Validator' not found in /home/Wh06GQ/prog.php:3
Stack trace:
#0 {main}
  thrown in /home/Wh06GQ/prog.php on line 3