PHP code example of dniccum / phone-number

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

    

dniccum / phone-number example snippets


use Dniccum\PhoneNumber\PhoneNumber;

PhoneNumber::make('Phone Number')

PhoneNumber::make('Phone Number')
    ->format('###-###-####')

PhoneNumber::make('Phone Number')
    ->format('###-###-#### ext ####')

PhoneNumber::make('Phone Number')
    ->format('###-###-####')
    ->disableValidation()

PhoneNumber::make('Phone Number')
    ->placeholder('Personal Home Number')

PhoneNumber::make('Phone Number')
    ->useMaskPlaceholder()

PhoneNumber::make('Phone Number')
    ->country('CA')

PhoneNumber::make('Phone Number')
    ->countries(['US', 'CA'])

PhoneNumber::make('Phone Number')
    ->linkOnIndex()

PhoneNumber::make('Phone Number')
    ->linkOnDetail()