PHP code example of fredbradley / laravel-rule-nhs-number

1. Go to this page and download the library: Download fredbradley/laravel-rule-nhs-number 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/ */

    

fredbradley / laravel-rule-nhs-number example snippets


'field_name' => 'nhsnumber'

return Validator::make($data, [
    'name' => ''
]);


return Validator::make($data, [
    'name' => '   'string',
        new \FredBradley\NhsNumber\ValidateNhsNumber()
    ]
]);

echo \FredBradley\NhsNumber\Generator::nhsNumber();
// '9278462608'

echo \FredBradley\NhsNumber\Generator::nhsNumber(3);
// ['7448556886', '0372104223', '8416367035']