PHP code example of spoorsny / laravel-south-african-id
1. Go to this page and download the library: Download spoorsny/laravel-south-african-id 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/ */
spoorsny / laravel-south-african-id example snippets
use Spoorsny\Laravel\Rules\SouthAfricanId;
$request->validate([
'id_number' => ['
use Spoorsny\Laravel\Rules\BirthDateMatchSouthAfricanId;
use Spoorsny\Laravel\Rules\SouthAfricanId;
$request->validate([
'south_african_id' => ['
use Spoorsny\Laravel\Casts\AsSouthAfricanId;
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'south_african_id' => AsSouthAfricanId::class,
];
}