Download the PHP package gabeta/lara-pnn without Composer
On this page you can find all versions of the php package gabeta/lara-pnn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package lara-pnn
Lara-pnn
Lara-pnn is a laravel package which allows you to format your phone number in the new Ivorian format (change from 8 digits to 10 digits).
Note:
From January 31, 2021, Ivorian numbers will change to 10 digits, ARTCI has published a note to help with migration.
This package will be useful for existing applications with an Ivorian number database. Ivory Coast Diald code is +225
Installation
Require this package with composer.
Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
Laravel without auto-discovery:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
And add this to your facades in app.php:
The package was designed for the Ivorian case but if you have a similar case
other than that of Côte d'Ivoire. This package handled it very well, you just have to publish and
modify the package configuration file. See more options in config/larapnn.php
Copy the package config to your local config with the publish command:
Usage
Prepare your model
So that your models can format your Ivorian numbers, the model must implement the following interface and trait:
Then you must define the fields concerned by the migration.
We check the eligibility of the number before migration based on the dial code
if the dial code value is in another field you must define with attribute $pnnDialCodeFields
:
Basic usage: Migrate without change database value
You can make a basic use of it which will migrate your numbers without modifying the values in the database.
Advanced usage: Database migration
For a migration of numbers in the database, the one-command package allows you to migrate all your numbers from a single mode.
You also have a command that allows you to rollback
You can add the take option to take records do you want:
You can add the skip option to skip the stats part (used if you are using a schedule job):