{"id":16260839,"url":"https://github.com/yajra/laravel-address","last_synced_at":"2025-03-16T13:30:55.006Z","repository":{"id":53499924,"uuid":"136464233","full_name":"yajra/laravel-address","owner":"yajra","description":"Philippines Regions, Provinces, Cities and Barangays Address Lookup API for Laravel.","archived":false,"fork":false,"pushed_at":"2024-04-15T14:00:29.000Z","size":4843,"stargazers_count":30,"open_issues_count":0,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T00:55:02.112Z","etag":null,"topics":["address","api","hacktoberfest","laravel","lookup","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/yajra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-07T10:57:44.000Z","updated_at":"2024-03-28T03:35:26.000Z","dependencies_parsed_at":"2024-03-02T14:06:39.855Z","dependency_job_id":"e8bdc183-f364-4f2b-a4bc-7daaf89335de","html_url":"https://github.com/yajra/laravel-address","commit_stats":{"total_commits":68,"total_committers":2,"mean_commits":34.0,"dds":"0.014705882352941124","last_synced_commit":"49d7a1dd908405d3476401ca753b33a1b774a5a0"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yajra%2Flaravel-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yajra%2Flaravel-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yajra%2Flaravel-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yajra%2Flaravel-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yajra","download_url":"https://codeload.github.com/yajra/laravel-address/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243815570,"owners_count":20352193,"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","hacktoberfest","laravel","lookup","php"],"created_at":"2024-10-10T16:21:27.095Z","updated_at":"2025-03-16T13:30:52.989Z","avatar_url":"https://github.com/yajra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Philippines Address Lookup for Laravel\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Continuous Integration](https://github.com/yajra/laravel-address/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/yajra/laravel-address/actions/workflows/continuous-integration.yml)\n[![Static Analysis](https://github.com/yajra/laravel-address/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/yajra/laravel-address/actions/workflows/static-analysis.yml)\n[![Quality Score][ico-code-quality]][link-code-quality]\n[![Total Downloads][ico-downloads]][link-downloads]\n[![Software License][ico-license]](LICENSE.md)\n\nA package for providing Philippines Address lookup API with Laravel.\n\n## Installation\n\n``` bash\ncomposer require yajra/laravel-address\n```\n\n### Register service provider (Optional on Laravel 5.5+)\n\n```php\nYajra\\Address\\AddressServiceProvider::class\n```\n\n### Publish config (Optional)\n\n```bash\nphp artisan vendor:publish\n```\n\n## Available Config\n\n`address.prefix` To change the API base route.\n\n`address.middleware` Route middleware.\n\n## Required Setup (Migration and Seeder)\n\n- Run the address migration. \n\n```bash\nphp artisan migrate\n```\n\n- Run the address seeder. \n\n```bash\nphp artisan db:seed Yajra\\\\Address\\\\Seeders\\\\AddressSeeder\n````\n\n## Routes\n\nThe default prefix for the api routes is `/api/address`. The default can be updated via config `address.php` file.\n\n- Get All Regions `/api/address/regions`.\n- Get All Provinces `/api/address/provinces`.\n- Get Provinces By Region `/api/address/provinces/{regionId}`.\n- Get Cities By Province `/api/address/cities/{provinceId}`.\n- Get Barangays By City `/api/address/barangays/{cityId}`.\n\n## Usage / Examples\n\n### Add address migration\n\nAdd address migration using `$table-\u003eaddress()`. This will add the following fields:\n- street\n- barangay_id\n- city_id\n- province_id\n- region_id\n\n### Include built-in form (Requires jQuery)\n\nOn your view, include `@include('address::form', ['model' =\u003e $modelWithAddress])`\n\n### Add scripts section on your master layout.\n\nBefore the end of body tag, include `@stack('scripts')`.\n\n```php\n\u003cbody\u003e\n-- Contents Here ---\n\n\u003cscript src=\"/vendor/jquery.js\"\u003e\u003c/script\u003e\n@stack('scripts')\n\u003c/body\u003e\n```\n\n## Model with Address Integration\n\nJust use `Yajra\\Address\\HasAddress` trait on your model to load address models relationship.\n\n```php\nuse Yajra\\Address\\HasAddress;\n\nclass User extends Model {\n    use HasAddress;\n}\n```\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email aqangeles@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Arjay Angeles][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/yajra/laravel-address.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/yajra/laravel-address/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/yajra/laravel-address.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/yajra/laravel-address.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/yajra/laravel-address.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/yajra/laravel-address\n[link-travis]: https://travis-ci.org/yajra/laravel-address\n[link-scrutinizer]: https://scrutinizer-ci.com/g/yajra/laravel-address/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/yajra/laravel-address\n[link-downloads]: https://packagist.org/packages/yajra/laravel-address\n[link-author]: https://github.com/yajra\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyajra%2Flaravel-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyajra%2Flaravel-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyajra%2Flaravel-address/lists"}