PHP code example of laravelfy / validator-enhancement
1. Go to this page and download the library: Download laravelfy/validator-enhancement library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
laravelfy / validator-enhancement example snippets
...
public function someEndPoint()
{
list(
$page,
$page_size
) = request()->validate(
[
'page' => 'integer|default:1|min:1',
'page_size' => 'integer|default:10|min:1|max:99',
]
);
...
}