PHP code example of tanthammar / laravel-rules

1. Go to this page and download the library: Download tanthammar/laravel-rules 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/ */

    

tanthammar / laravel-rules example snippets


use TantHammar\LaravelRules\Rules\PhoneNumber;
use TantHammar\LaravelRules\Rules\PersonNummer;

SomeField::make('phone')
    ->rules([ new PhoneNumber ])
SomeField::make('person_nummer')
    ->rules([ new PersonNummer ])