This is a Composer plugin that provides an automated version of Country Codes database.

Overview

Country Codes

This is a Composer plugin that provides an automated version of Country Codes database.

This database is include: country iso codes, country names, country names with phone codes, phone codes as well as admin page to manage your list of data.

Screenshot

What you can do?

  • Get users country names
  • Get users phone numbers
  • Send OTP codes
  • Send message on messangers

Usage of this package are vary, those were just small examples of what you can do.

Also my main reason to build this package was to send WhatsApp message (specifically OTP codes).

Table Of Contents

Requirements

Source Version
Composer ^2.0
PHP ^7.4/^8.0

Installation

The only thing you need to do to make this work is adding this package as a dependency to your project:

composer require irando/country-codes

Usage

  1. Add following line in your config/app.php file
'providers' => [
    // ...
    Irando\CountryCodes\CountryCodesServiceProvider::class,
];
  1. Run either of commands below to publish package files
php artisan vendor:publish

And select id referred to:

Irando\CountryCodes\CountryCodesServiceProvider

OR

php artisan vendor:publish --tag=country-codes
  1. Run php artisan migrate to add countries table into your database
  2. Run php artisan db:seed --class=CountryCodesTableSeeder to seed countries data into countries table.

Note: In case of error after this command run composer dumpautoload and try again to seed database

Now visit your_url.tld/country-codes and you are set.

Customization

If you need (probably you do!) to customize the look, routing, functionality etc. of this package, at stage 2 of installation we deployed CountryCodes.php which is your table model, as well as view files at resources/views/vendor/irando/country-codes you can edit those files and create your own.

Contributing

All feedback / bug reports / pull requests are welcome.

You can support me for more open source projects by sponsoring this package

License

This code is released under the MIT license.

For the full copyright and license information, please view the LICENSE file distributed with this source code.

Developed by Robert Nicjoo at CV. IRANDO

You might also like...
Laravel Form builder for version 5+!

Laravel 5 form builder Form builder for Laravel 5 inspired by Symfony's form builder. With help of Laravels FormBuilder class creates forms that can b

Laravel package to generate and to validate a UUID according to the RFC 4122 standard. Only support for version 1, 3, 4 and 5 UUID are built-in.

Laravel Uuid Laravel package to generate and to validate a universally unique identifier (UUID) according to the RFC 4122 standard. Support for versio

An enhanced version of the Laravel container.
An enhanced version of the Laravel container.

Laravel Enhanced Container This package provides syntax sugar for the Laravel container calls and bindings, automatic resolution of bound implementati

Tool Berbasis Web Untuk membuat Laporan Praktik Kerja Lapangan Version 1.0

PKL-AUTO Tool Berbasis Web Untuk membuat Laporan Praktik Kerja Lapangan Version 1.0 Features : Online/Offline Mode Laporan langsung aja Tinggal Select

Make your church sermons available for download.  For the latest version, go:
Make your church sermons available for download. For the latest version, go:

Laravel Church Sermons App Laravel church sermons app is basically an app for churches to make available the messages preached in church for all membe

Proxy validation or Proxy checker. Command line version
Proxy validation or Proxy checker. Command line version

Proxy Checker Proxy validation or Proxy checker Install on desktop : Install XAMPP Added environment variable system path = C:\xampp\php download the

This package wraps up the standalone executable version of the Tailwind CSS framework for a Laravel application.

Tailwind CSS for Laravel Introduction This package wraps the standalone Tailwind CSS CLI tool. No Node.js required. Inspiration This package was inspi

Stash view is a composer package for Laravel which caches views using Russian Doll Caching methodology.
Stash view is a composer package for Laravel which caches views using Russian Doll Caching methodology.

Stash View Stash view is a composer package for Laravel which caches views using Russian Doll Caching methodology. What is Russian Doll Caching ? It i

Composer package which adds support for HTML5 elements using Laravels Form interface (e.g. Form::date())

Laravel HTML 5 Inputs Composer package which adds support for HTML5 elements by extending Laravel's Form interface (e.g. Form::date()) Adds support fo

Owner
Robert Nicjoo
Laravel, WordPress, Ionic, Vue.js, Angular.Js, Node.Js, Flutter
Robert Nicjoo
🛂 Use this package to validate the identity card from your country using laravel validation rules.

Identity Card Checker Laravel Validation Rules Use this package to validate the identity card number from your country Installation You can install th

David Torralbo Pérez 13 Feb 8, 2022
Example of using TALL stack to select country phone code.

Select country phone code using TALL stack About Example of using TALL stack to select country phone code. Each item represents a country. Each item h

Fernando Chagas 3 Jul 27, 2022
Smeify is a Stable Automated Solution for Airtime and Data businesses in Nigeria, this package helps you integrate smeify easily into your laravel application.

Smeify is a Stable Automated Solution for Airtime and Data businesses in Nigeria, this package helps you integrate smeify easily into your laravel application.

Ogundiran Adewale Charles 2 Jul 27, 2022
Automated Laravel TALL-stack installation with superpowers.

Easy command to install the TALL-stack & jumpstart development ?? This package provides a simple artisan command for Laravel that can fully scaffold y

Ralph J. Smit 38 Dec 3, 2022
Simple Video is a automated H264 encryption system built on Lumen Laravel Framework

Simple Video is a automated H264 encryption system built on Lumen Laravel Framework

Azril Nazli Alias 4 Oct 5, 2022
Promotional Codes Generator for Laravel >5

laravel-promocodes Promocodes generator for Laravel 5.*. Trying to make the best package in this category. You are welcome to join the party, give me

Zura Gabievi 425 Dec 26, 2022
Tool to convert from composer.yml to composer.json.

composer-yaml This project allows you to convert a composer.yml file into composer.json format. It will use those exact filenames of your current work

Igor 56 Sep 28, 2022
Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

Laravel Package for TMDB API Wrapper A Laravel package that provides easy access to the php-tmdb/api TMDB (The Movie Database) API wrapper. This packa

PHP - The Movie Database 151 Nov 1, 2022
Composer plugin for cleaning up unused files from packages.

Composer Cleanup Plugin Remove tests & documentation from the vendor dir. Based on laravel-vendor-cleanup but implemented as a Composer Plugin instead

Barry vd. Heuvel 136 Dec 15, 2022
If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

hirwa-products-plugin If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

NIYIBIZI HIRWA 1 Aug 23, 2022