{"id":15681713,"url":"https://github.com/corpsepk/yii2-dadata-suggestions-widget","last_synced_at":"2025-10-08T08:57:10.186Z","repository":{"id":56958156,"uuid":"83675807","full_name":"corpsepk/yii2-dadata-suggestions-widget","owner":"corpsepk","description":"Yii2 wrapper for DaData's jQuery plugin","archived":false,"fork":false,"pushed_at":"2018-09-25T09:26:51.000Z","size":34,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-16T07:15:45.770Z","etag":null,"topics":["dadata","yii2","yii2-extension"],"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/corpsepk.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-03-02T12:33:39.000Z","updated_at":"2021-08-12T16:45:41.000Z","dependencies_parsed_at":"2022-08-21T09:50:20.262Z","dependency_job_id":null,"html_url":"https://github.com/corpsepk/yii2-dadata-suggestions-widget","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/corpsepk/yii2-dadata-suggestions-widget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpsepk%2Fyii2-dadata-suggestions-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpsepk%2Fyii2-dadata-suggestions-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpsepk%2Fyii2-dadata-suggestions-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpsepk%2Fyii2-dadata-suggestions-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corpsepk","download_url":"https://codeload.github.com/corpsepk/yii2-dadata-suggestions-widget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpsepk%2Fyii2-dadata-suggestions-widget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278916432,"owners_count":26068090,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dadata","yii2","yii2-extension"],"created_at":"2024-10-03T16:58:58.861Z","updated_at":"2025-10-08T08:57:10.124Z","avatar_url":"https://github.com/corpsepk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii2-dadata-suggestions-widget\n\n[![Latest Version](https://img.shields.io/github/tag/corpsepk/yii2-dadata-suggestions-widget.svg?style=flat-square\u0026label=release)](https://github.com/corpsepk/yii2-dadata-suggestions-widget/tags)\n[![Build Status](https://img.shields.io/travis/corpsepk/yii2-dadata-suggestions-widget/master.svg?style=flat-square)](https://travis-ci.org/corpsepk/yii2-dadata-suggestions-widget)\n[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/corpsepk/yii2-dadata-suggestions-widget.svg?style=flat-square)](https://scrutinizer-ci.com/g/corpsepk/yii2-dadata-suggestions-widget/code-structure)\n[![Quality Score](https://img.shields.io/scrutinizer/g/corpsepk/yii2-dadata-suggestions-widget.svg?style=flat-square)](https://scrutinizer-ci.com/g/corpsepk/yii2-dadata-suggestions-widget)\n\nWrapper for [DaData](https://dadata.ru/suggestions/)'s jQuery plugin\n\n## Installation\n\n### 1. Download\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nRun the following command:\n\n```bash\n$ composer require corpsepk/yii2-dadata-suggestions-widget:~0.4\n```\n\n### 2. Get api key\nRegister at [DaData.ru](https://dadata.ru/profile/#info), and get api key.\n\n### 3. Configure (optional)\nYou can setup container definitions if you do not want to enter api key in every widget.\nAdd following lines to your main configuration file:\n\n```php\n'container' =\u003e [\n    'definitions' =\u003e [\n        'corpsepk\\DaData\\SuggestionsWidget' =\u003e [\n            'token' =\u003e 'my-dadata-api-key',\n        ],\n    ],\n],\n```\n\n## Usage\n\n```php\nuse corpsepk\\DaData\\SuggestionsWidget;\n```\n\n```php\n\u003c?= SuggestionsWidget::widget([\n    'model' =\u003e $model,\n    'attribute' =\u003e 'inn',\n    'token' =\u003e 'your apiKey'\n]) ?\u003e\n```\nThe following example will use the name property instead:\n```php\n\u003c?= SuggestionsWidget::widget([\n    'name' =\u003e 'inn',\n    'token' =\u003e 'your apiKey'\n]) ?\u003e\n```\nYou can also use this widget in an `yii\\widgets\\ActiveForm` using the `yii\\widgets\\ActiveField::widget()`\nmethod, for example like this:\n```php\n\u003c?= $form-\u003efield($model, 'inn')-\u003ewidget(SuggestionsWidget::class, [\n    'token' =\u003e 'your apiKey'\n]) ?\u003e\n```\n\n## Useful links\n\n- DaData - https://dadata.ru\n- jQuery plugin - https://github.com/hflabs/suggestions-jquery\n- jQuery plugin options - https://confluence.hflabs.ru/pages/viewpage.action?pageId=204669097\n- Hints - https://dadata.userecho.com/topics/2090\n\n\n## Testing\n\n```bash\n$ ./vendor/bin/phpunit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorpsepk%2Fyii2-dadata-suggestions-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorpsepk%2Fyii2-dadata-suggestions-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorpsepk%2Fyii2-dadata-suggestions-widget/lists"}