1. Go to this page and download the library: Download devsarfo/laraphone 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/ */
devsarfo / laraphone example snippets
'phone' => 'phone:NO,GH',
// 'phone' => new PhoneNumberRule(['NO', 'GH'])
'country_code' => 'red', new PhoneNumberRule($this->country_code)],
'phone' => 'The :attribute field must be a valid phone number.',
use DevSarfo\LaraPhone\Models\PhoneNumber;
(string) new PhoneNumber('+4722334455'); // +4722334455
(string) new PhoneNumber('22334455', 'NO'); // +4722334455