{"id":20681519,"url":"https://github.com/api-postcode/api-postcode-laravel","last_synced_at":"2025-06-17T02:36:11.280Z","repository":{"id":54203799,"uuid":"93421932","full_name":"api-postcode/api-postcode-laravel","owner":"api-postcode","description":"Laravel package for Api Postcode","archived":false,"fork":false,"pushed_at":"2023-01-03T12:35:01.000Z","size":12,"stargazers_count":3,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T14:45:20.878Z","etag":null,"topics":["address","api-postcode","laravel","package","php","postcode"],"latest_commit_sha":null,"homepage":"https://api-postcode.nl","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/api-postcode.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}},"created_at":"2017-06-05T16:03:16.000Z","updated_at":"2024-04-26T17:04:49.000Z","dependencies_parsed_at":"2023-02-01T06:15:22.086Z","dependency_job_id":null,"html_url":"https://github.com/api-postcode/api-postcode-laravel","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/api-postcode/api-postcode-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-postcode%2Fapi-postcode-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-postcode%2Fapi-postcode-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-postcode%2Fapi-postcode-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-postcode%2Fapi-postcode-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/api-postcode","download_url":"https://codeload.github.com/api-postcode/api-postcode-laravel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-postcode%2Fapi-postcode-laravel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260278419,"owners_count":22985283,"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":["address","api-postcode","laravel","package","php","postcode"],"created_at":"2024-11-16T22:11:09.205Z","updated_at":"2025-06-17T02:36:11.242Z","avatar_url":"https://github.com/api-postcode.png","language":"PHP","readme":"Laravel Api Postcode Package\n============================\n\nA laravel package for fetching Address details\n\nFor more information see: [https://api-postcode](https://api-postcode.nl/)\n\n## Requirements ##\n\nLaravel 5.1 or later\n\n\nInstallation\n------------\nInstallation is a quick 3 step process:\n\n1. Download api-postcode-laravel using composer\n2. Enable the package in app.php\n3. Configure your Api Postcode credentials\n\n### Step 1: Download api-postcode-laravel using composer\n\nAdd api-postcode/api-postcode-laravel by running the command:\n\n```\ncomposer require api-postcode/api-postcode-laravel\n```\n\n### Step 2: Enable the package in app.php\n\nRegister the Service in: **config/app.php**\n\n``` php\nApiPostcode\\ApiPostcodeServiceProvider::class,\n````\n\nOptional - Register the Facade in: **config/app.php**\n\n``` php\n'aliases' =\u003e [\n    //...\n    'Postcode' =\u003e ApiPostcode\\Facade\\Postcode::class,\n];\n````\n\n### Step 3: Configure Api Postcode credentials\n\n```\nphp artisan vendor:publish --provider=\"ApiPostcode\\ApiPostcodeServiceProvider\"\n```\n\nAdd this in you **.env** file\n\n```\nAPI_POSTCODE_TOKEN=secret-token-from-api-postcode\n```\n\nUsage\n-----\n\n``` php\n$address = app('api.postcode')-\u003efetchAddress('1012JS', 1);\n\t\n$address-\u003egetStreet();      // Dam\n$address-\u003egetCity();        // Amsterdam\n$address-\u003egetHouseNumber(); // 1\n$address-\u003egetZipCode();     // 1012JS\n$address-\u003egetLongitude();   // 4.4584\n$address-\u003egetLatitude();    // 52.2296\n````\n\nOr use the Facade:\n\n``` php\n$address = Postcode::fetchAddress('1012JS', '1')\n````\n\nOr straight in routes:\n\n``` php\n$router-\u003eget('postcode/{zipCode}/{number}', function ($zipCode, $number) {\n    return Postcode::fetchAddress($zipCode, $number);\n});\n````\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapi-postcode%2Fapi-postcode-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapi-postcode%2Fapi-postcode-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapi-postcode%2Fapi-postcode-laravel/lists"}