According to the documentation:
$validator = Validator::make($request->all(), [
'file' => 'max:500000',
]);
The value is in kilobytes, for example:
-
max:10240= max 10 MB. -
max:1= max 1024 bytes.
Note that there are efforts to change the value of
1 kilobytesfrom original1024to1000bytes, but major frameworks likeLaravelremain using original1024value, which prevents confusion of senior developers (which are used to1024).