{"id":26875211,"url":"https://github.com/ayoub-amzil/offline-globe","last_synced_at":"2026-05-09T01:05:23.275Z","repository":{"id":214884221,"uuid":"737327498","full_name":"ayoub-amzil/offline-globe","owner":"ayoub-amzil","description":"Offline country data for PHP Laravel framework. Over 200 countries, capitals, flags, languages, currencies. No internet needed.","archived":false,"fork":false,"pushed_at":"2024-02-14T20:10:03.000Z","size":5180,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-02-15T00:24:05.015Z","etag":null,"topics":["composer","data","internet","laravel","offline","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayoub-amzil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-30T16:25:46.000Z","updated_at":"2024-02-15T00:24:05.015Z","dependencies_parsed_at":"2024-01-12T21:50:02.812Z","dependency_job_id":"7208d65c-a0f7-45a5-8bbb-7d0a7ba4a900","html_url":"https://github.com/ayoub-amzil/offline-globe","commit_stats":null,"previous_names":["ayoub-amzil/offline-globe"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoub-amzil%2Foffline-globe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoub-amzil%2Foffline-globe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoub-amzil%2Foffline-globe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoub-amzil%2Foffline-globe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayoub-amzil","download_url":"https://codeload.github.com/ayoub-amzil/offline-globe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246457224,"owners_count":20780665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","data","internet","laravel","offline","php"],"created_at":"2025-03-31T10:39:27.136Z","updated_at":"2026-05-09T01:05:23.237Z","avatar_url":"https://github.com/ayoub-amzil.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# __Offline Globe__\n\nOffline country data for PHP Laravel framework. Over 200 countries, capitals, flags, languages, currencies. No internet needed.\nThis packages uses the 7 model continent, and this is a [Reference](https://github.com/ayoub-amzil/offline-globe/blob/main/countries.txt) for all the countries included.\n\n\n## __Installation__\n```bash\n  cd my-laravel-project\n  composer require ayoub-amzil/offline-globe\n```\n    \n## __Usage/Examples__\n__Import class__\n```php\nuse offline\\Globe; \n```\n__Create an instance__\n```php\n$globe = new Globe();\n```\n__Functions available__\n\nReturn an array type value of all countries available\n```php\n$globe-\u003eCountries()\n```\nReturn an array type value of African countries\n```php\n$globe-\u003eAfrican()\n```\nReturn an array type value of Asian countries\n```php\n$globe-\u003eAsian()\n```\nReturn an array type value of Australian countries\n```php\n$globe-\u003eAustralia()\n```\nReturn an array type value of European countries\n```php\n$globe-\u003eEurope()\n```\nReturn an array type value of North America countries\n```php\n$globe-\u003eNorthAmerica()\n```\nReturn an array type value of South America countries\n```php\n$globe-\u003eSouthAmerica()\n```\nReturn the country code of the given country. The function accept one argument of type string.\n```php\n$globe-\u003eCode('Morocco') // MA (return type: string)\n```\nReturn the capital of the given country. The function accept one argument of type string.\n```php\n$globe-\u003eCapital('japan') // Tokyo (return type: string)\n```\nReturn the Languages spoken in the given country. The function accept one argument of type string.\n```php\n$globe-\u003eLanguage('jamaica') // ['english', 'jamaican_patois'] (return type: array)\n```\nReturn the currency used in the given country. The function accept one or two arguments\n```php\n// It can take only the country (mandatory)\n$globe-\u003eCurrency('Canada') // ['name' =\u003e 'Canadian Dollar', 'code' =\u003e 'CAD'] (return type: array)\n\n// Or the country plus one type of information\n// name (option)\n$globe-\u003eCurrency('canada','name') // Canadian Dollar (return type: string)\n// code (option)\n$globe-\u003eCurrency('canada','code') // CAD (return type: string)\n```\nReturn the flag of the given country. The function accept three arguments. Country,  type of the flag, and a directory name where the flags are saved. \n```php\n// country (mandatory)\nreturn view('welcome',\n            ['flag'=\u003e$globe-\u003eflag('united states')]\n        ); //  (return type: string)\n\n// In your template\n\u003cimg src=\"{{$flag}}\" alt=\"image\"\u003e\n```\n```php\n// type (option) [default=svg]\nreturn view('welcome',\n            ['flag'=\u003e$globe-\u003eflag('united states','png')]\n        ); //  (return type: string)\n\n// In your template\n\u003cimg src=\"{{$flag}}\" alt=\"image\"\u003e\n```\n```php\n// directory name (option) [default=flags]\n// PS:  if you want to change your directory name, you have to set the type before\nreturn view('welcome',\n            ['flag'=\u003e$globe-\u003eflag('united states','png','images')]\n        ); //  (return type: string)\n\n// In your template\n\u003cimg src=\"{{$flag}}\" alt=\"image\"\u003e\n```\n\n## __Authors__\n\n[@ayoub-amzil](https://github.com/ayoub-amzil/)\n## __License__\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\n## __Contributing__\n\nContributions are always welcome!\n\n\n\n\n## __Acknowledgements__\n\n - [Flagpedia](https://flagpedia.net/about)\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayoub-amzil%2Foffline-globe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayoub-amzil%2Foffline-globe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayoub-amzil%2Foffline-globe/lists"}