Download the PHP package ellisio/laravel-phone without Composer

On this page you can find all versions of the php package ellisio/laravel-phone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-phone

Laravel Phone

Latest Stable Version License Total Downloads Build Status

Introduction

A phone validator for Laravel 6+ using the free Twilio Lookup API.

This package gives developers the ability to validate phone numbers and format phone numbers. All data will be pulled from the Twilio Lookup API.

Validation can be configured to check if the number is valid, or if it is valid within a given list of ISO-3166-1 Alpha 2 country codes.

Installation

Install via composer:

Add your Twilio credentials to your .env file. If you don't have a Twilio account you can register one here for free.

Configuration

If you want to customize the configuration for this package, you can publish the config file to /config/phone.php by running the following command:

If you want to customize the output of the validation messages, you can publish the translations file to /lang/vendor/laravel-phone by running the following command:

Usage

Phone validation

If you need to verify that the given number is valid and that is all, use the phone rule.

Country validation

If you need to validate that the given number is valid in a list of countries, use the phone_country:US,CA rule. You can list as many ISO-3166-1 Alpha 2 as you wish delimited by a comma.

Formatting phone numbers

If you want to format the phone number using INTERNATIONAL_FORMAT use the following code:

Creating phone number objects

This library includes the ability to generate a Phone object. This object contains the following details about a number:

Handling invalid numbers

Sometimes you may have bad data, it happens. To handle this, simply check to see if null was returned.

Support

Need help? Create an issue.


All versions of laravel-phone with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
illuminate/contracts Version ^6.0|^7.0
illuminate/container Version ^6.0|^7.0
illuminate/support Version ^6.0|^7.0
illuminate/validation Version ^6.0|^7.0
twilio/sdk Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ellisio/laravel-phone contains the following files

Loading the files please wait ....