{"id":36316896,"url":"https://github.com/denis-kisel/laravel-admin-widget","last_synced_at":"2026-01-11T11:03:38.303Z","repository":{"id":56965471,"uuid":"180136291","full_name":"denis-kisel/laravel-admin-widget","owner":"denis-kisel","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-31T15:41:23.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T14:50:34.223Z","etag":null,"topics":["for","generator","laravel-admin","widget"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denis-kisel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-08T11:39:34.000Z","updated_at":"2021-06-28T00:35:29.000Z","dependencies_parsed_at":"2022-08-21T10:20:59.960Z","dependency_job_id":null,"html_url":"https://github.com/denis-kisel/laravel-admin-widget","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/denis-kisel/laravel-admin-widget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denis-kisel%2Flaravel-admin-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denis-kisel%2Flaravel-admin-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denis-kisel%2Flaravel-admin-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denis-kisel%2Flaravel-admin-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denis-kisel","download_url":"https://codeload.github.com/denis-kisel/laravel-admin-widget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denis-kisel%2Flaravel-admin-widget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28301387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T08:21:30.231Z","status":"ssl_error","status_checked_at":"2026-01-11T08:21:26.882Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["for","generator","laravel-admin","widget"],"created_at":"2026-01-11T11:03:37.610Z","updated_at":"2026-01-11T11:03:38.295Z","avatar_url":"https://github.com/denis-kisel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LaravelAdminWidget\n\nPackage for laravel-admin.\n\n## Installation\n\nVia Composer\n\n``` bash\n$ composer require denis-kisel/laravel-admin-widget\n```\n\nAdd service provider in the config/app.php file. Optional for laravel5.4+ \n\n``` php\n/*\n * Package Service Providers...\n */\nDenisKisel\\LaravelAdminWidget\\LaravelAdminWidgetServiceProvider::class,\n```\n\nMake publish\n``` bash\n$  php artisan vendor:publish --provider=\"DenisKisel\\\\LaravelAdminWidget\\\\LaravelAdminWidgetServiceProvider\"\n```\n\nRun migration\n``` bash\n$  php artisan migrate\n```\n\n## Usage\n### Make Widget\nCommand: `php artisan admin:widget {name}`\n\n``` bash\n$ php artisan admin:widget Slider\n```\n\nThis command will generate file by path: app/Admin/Controllers/Widgets/SliderWidget.php.  \nAnd will add route `site.com/admin/slider-widget`\n\n### Get Widget Data\nGet widget data as array:\n\n``` php\n\u003c?php\n\nuse DenisKisel\\LaravelAdminWidget\\Facade\\Widget;\n\n\nWidget::getArray($code)\n```\n\nGet widget data as collection\n\n``` php\n\u003c?php\n\nuse DenisKisel\\LaravelAdminWidget\\Facade\\Widget;\n\n\nWidget::getCollection($code)\n```\n\n\n### Put Custom Data\n\nAlso possible put custom data\n\n``` php\n\u003c?php\n\nuse DenisKisel\\LaravelAdminWidget\\Facade\\Widget;\n\n\nWidget::put($code, $data) #Store or update widget\n```\n\n## Sortable items\nFor Sortable Items I use jquery-ui lib.  \n{items} - Is NestedForm Key\n```php\nAdmin::js('/js/admin/jquery-ui.min.js');\nAdmin::script('$(function() {\n    $(\\'.has-many-{items}-forms\\').sortable();\n});');\n```\n\nLive Example:\n```php\npublic function form()\n{\n    Admin::js('/js/admin/jquery-ui.min.js');\n    Admin::script('$(function() {\n            $(\\'.has-many-items-forms\\').sortable();\n        });');\n\n    $data = Widget::getArray($this-\u003ecode);\n    $form = new \\Encore\\Admin\\Widgets\\Form($data);\n\n    $form-\u003erepeat('items', function (NestedForm $form) {\n        $form-\u003etextarea('title', __('admin.title'));\n        $form-\u003eimage('image', __('admin.image'));\n    });\n\n    $form-\u003eaction(url()-\u003ecurrent());\n\n    return $form-\u003erender();\n}\n```\n\n## Fix Error\n`Call to a member function getKey()`  \nFor fix this error, just run:\n```bash\nphp artisan fix:nested_form\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenis-kisel%2Flaravel-admin-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenis-kisel%2Flaravel-admin-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenis-kisel%2Flaravel-admin-widget/lists"}