Library for getting countries info from restcountries.com

Overview

librestcountries

Library for getting countries info from restcountries.com

Description

Library for getting countries info from restcountries.com

Getting Started

Dependencies

  • PHP >= 5

Installation

composer require mrferrys/librestcountries

Usage

  • How to list all countries.
	use librestcountries\restCountriesClient as rcClient;
	
	$restClient 			= 	new rcClient();
	$restClient->urlBase	=	"https://restcountries.com/v3.1/";
	$result					=	$restClient->listAll();
	foreach($result as $key=>$value)
	{
		$name=$value->name->common;
		echo ".- $name ".PHP_EOL;
	}
  • How to filter by property.Filter fields (name,full_name,code,list_of_codes,currency,lang,capital,region,subregion).
	$field	=	"name";
	$value	=	"spain";
	$result	=	$restClient->filterBy($field,$value);
	foreach($result as $key=>$value)
	{
		$name=$value->name->common;
		$official=$value->name->official;
		echo ".- $name/$official ".PHP_EOL;
	}

Authors

MrFerrys

Version History

  • 1.0.0
    • Initial Release (X.Y.Z MAJOR.MINOR.PATCH)

License

This project is licensed under the MiT License - see the LICENSE file for details

Acknowledgments

REST Countries API:

You might also like...
Base library for repeated layout fields, content builders and other collection components

laravel-flexible-content This package's only purpose is to build custom repeated layout components, such as Laravel Nova's Flexible Content field or y

PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.

reCAPTCHA PHP client library reCAPTCHA is a free CAPTCHA service that protects websites from spam and abuse. This is a PHP library that wraps up the s

Laravel Echo library for beautiful Pusher and Ably integration.

Introduction In many modern web applications, WebSockets are used to implement realtime, live-updating user interfaces. When some data is updated on t

 BigBlueButton Server API Library for Laravel
BigBlueButton Server API Library for Laravel

BigBlueButton Server API Library for Laravel Package that provides easily communicate between BigBlueButton server and laravel framework Requirements

SSLCommerz Payment gateway library for Laravel framework

SSLCommerz SSLCommerz Payment gateway library for Laravel framework. Official documentation is here. install composer require sam-asif/sslcommerz Pro

Shoutout messaging library for laravel
Shoutout messaging library for laravel

Laravel Shoutout Messaging Shoutout messaging library for Laravel Laravel PHP framework Shoutout Messaging Requirements PHP 5.6+ Laravel 5.5+ Installa

Library for generating random names (for table-top roleplaying games)

RPG-Name-Generator The RPG character name generator library is designed to create list of random names used for table-top role-playing games. This lib

Menu Library for PHP

KnpMenu The KnpMenu library provides object oriented menus for PHP. It is used by the KnpMenuBundle for Symfony but can now be used stand-alone. Insta

PHP 5.3 Object Oriented image manipulation library

Imagine Tweet about it using the #php_imagine hashtag. Image manipulation library for PHP 5.3 inspired by Python's PIL and other image libraries. Requ

Owner
null
Source for "Getting Started with TALL stack" post

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Kim Hallberg 2 Sep 16, 2022
A Laravel package providing a list of the countries, states, cities, currencies and timezones

A Laravel package to provide a list of the countries, cities, timezones, currencies and phone numbers formatting/validation helpers. The package can b

Najm Njeim 492 Dec 24, 2022
A simple Laravel Package to sort Countries, States and Cities

Laravel Location ▲ Introduction ?? This Package offers a simple way to get Countries, Cities and States that you may need for your Application, most e

Michael Okoh 197 Jan 1, 2023
Laravel countries and currencies

Countries What does it gives you? This package has all sorts of information about countries: info items taxes 32 geometry maps 248 topology maps 248 c

Antonio Carlos Ribeiro 1.7k Dec 29, 2022
Countries for Laravel

Countries for Laravel What does it gives you? This package has all sorts of information about countries: info items taxes 32 geometry maps 248 topolog

Antonio Carlos Ribeiro 140 Jan 5, 2023
Laravel Abdal Detector - Find info about IP , OS and web browser from your client

Laravel Abdal Detector - Find info about IP , OS and web browser from your client

 Abdal Security Group 1 Mar 24, 2022
Get info from any web service or page

Embed PHP library to get information from any web page (using oembed, opengraph, twitter-cards, scrapping the html, etc). It's compatible with any web

Oscar Otero 1.9k Jan 4, 2023
Lavacharts is a graphing / charting library for PHP 5.4+ that wraps Google's Javascript Chart API.

Lavacharts 3.1.12 Lavacharts is a graphing / chart library for PHP5.4+ that wraps the Google Chart API. Stable: Dev: Developer Note Please don't be di

Kevin Hill 616 Dec 17, 2022
A laravel service provider for the netsuite-php library service

netsuite-laravel A PHP supplemental package to the ryanwinchester/netsuite-php package to add the NetSuite service client to the service container of

NetsuitePHP 6 Nov 9, 2022
Library extra fields for Laravel Orchid Platform

Orchid Fields Extra library which add different fields in Laravel Orchid Platform Installation You may install into your project using the Composer pa

Ilya 12 Nov 9, 2022