{"id":20144191,"url":"https://github.com/quansitech/la-filepond","last_synced_at":"2025-04-09T18:53:55.826Z","repository":{"id":57069562,"uuid":"172467411","full_name":"quansitech/la-filepond","owner":"quansitech","description":"a file upload form widget for laravel-admin","archived":false,"fork":false,"pushed_at":"2019-09-10T11:01:17.000Z","size":342,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T20:51:18.270Z","etag":null,"topics":["filepond","laravel-admin","laravel-admin-extension"],"latest_commit_sha":null,"homepage":"http://laravel-admin.org/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quansitech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.996ICU","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-25T08:42:27.000Z","updated_at":"2023-02-08T06:59:48.000Z","dependencies_parsed_at":"2022-08-24T14:54:17.764Z","dependency_job_id":null,"html_url":"https://github.com/quansitech/la-filepond","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fla-filepond","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fla-filepond/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fla-filepond/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fla-filepond/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quansitech","download_url":"https://codeload.github.com/quansitech/la-filepond/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248093756,"owners_count":21046739,"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":["filepond","laravel-admin","laravel-admin-extension"],"created_at":"2024-11-13T22:09:13.094Z","updated_at":"2025-04-09T18:53:55.781Z","avatar_url":"https://github.com/quansitech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# filepond for laravel-admin\n\n![Travis (.com)](https://img.shields.io/travis/com/tiderjian/la-filepond.svg?style=flat-square)\n![style ci](https://img.shields.io/travis/com/tiderjian/la-filepond.svg?style=flat-square)\n![download](https://img.shields.io/packagist/dt/tiderjian/la-filepond.svg?style=flat-square)\n![lincense](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)\n[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)\n![Pull request welcome](https://img.shields.io/badge/pr-welcome-green.svg?style=flat-square)\n\n## [中文文档](https://github.com/tiderjian/la-filepond/blob/master/README_CN.md)\n\n## About\n   [Filepond](https://github.com/pqina/filepond)is a flexible and fun JavaScript file upload library, that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience. Filepond for laravel-admin is [laravel-admin](https://github.com/z-song/laravel-admin) extention base on it.\n   \n\n## Why\nlaravel-admin's upload item is hard to use and more complex, and slowly upload while more multiple files, this is a bad user experience. Filepond upload by ajax, suitable for multiple file upload.\n\n## Demo\n\u003cimg src=\"https://user-images.githubusercontent.com/1665649/54975771-280ac900-4fd3-11e9-91c6-c26661242fcb.gif\" /\u003e\n\n## Install\nfirst, install [laravel-admin](https://github.com/z-song/laravel-admin), and run below command.\n```\ncomposer require tiderjian/la-filepond\n```\nrun laravel-admin extention import.\n```\nphp artisan admin:import filepond\n```\n\n## Config\nfind out the extensions segment in the config/admin.php，add filepond config\n```\n'extensions' =\u003e [\n    'filepond' =\u003e [\n        // enable or disable the extension\n        'enable' =\u003e true,\n        // atuo delete the uploaded files(default false)\n        'autodelete' =\u003e true\n    ]\n]\n```\n\n## Usage\n```\n//image upload\n$form-\u003efilepondImage(@database column, @label)\n//file upload\n$form-\u003efilepondFile(@database column, @label)\n\n//multiple images upload\n$form-\u003efilepondImage(@database column, @label)-\u003emultiple()\n//multiple files upload\n$form-\u003efilepondFile(@database column, @label)-\u003emultiple()\n\n//ps:multiple upload save to database in json，must set the casts to json on the model.\nprotected $casts = [\n    'images' =\u003e 'json',\n    'files'  =\u003e 'json',\n];\n\n//set required\n$form-\u003efilepondImage(@database column, @label)-\u003erules('required')\n\n//set file type that can be uploaded.\n$form-\u003efilepondFile(@database column, @label)-\u003emineType(['application/msword', 'application/pdf'])\n$form-\u003efilepondFile(@database column, @label)-\u003emineType('application/msword')\n\n//set max file size, unit: KB\n$form-\u003efilepondFile(@database column, @label)-\u003esize(30)\n```\n\n## extension\nYou can extend it by youself, here is a sample that extend a image size validate plugin.\n1. download [filepond-plugin-image-validate-size](https://github.com/pqina/filepond-plugin-image-validate-size),add to public/vendor/laravel-admin-ext/la-filepond/js \n\n2. add to app/Admin/bootstrap.php\n```\n\\Encore\\Admin\\Admin::booting(function(){\n    \\Qs\\La\\Filepond\\File::extendPluginJs(['/vendor/laravel-admin-ext/la-filepond/js/filepond-plugin-image-validate-size.min.js']);\n    \\Qs\\La\\Filepond\\File::extendPlugin('FilePondPluginImageValidateSize');\n    //use the \\Qs\\La\\Filepond\\File::extendPluginCss function to add css file\n});\n```\n\n3. find out the pulgin document, and add config as you like\n```\n//imageValidateSizeMinWidth、imageValidateSizeMaxWidth is the config keys\n$form-\u003efilepondImage('images', 'images')-\u003emultiple()-\u003eoptions(['imageValidateSizeMinWidth' =\u003e 200, 'imageValidateSizeMaxWidth' =\u003e 400]);\n```\n\n## lincense\n[MIT License](https://github.com/tiderjian/la-filepond/blob/master/LICENSE.MIT) AND [996ICU License](https://github.com/tiderjian/la-filepond/blob/master/LICENSE.996ICU)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fla-filepond","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquansitech%2Fla-filepond","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fla-filepond/lists"}