{"id":21504442,"url":"https://github.com/dcasia/nova-filepond","last_synced_at":"2025-04-10T03:56:38.491Z","repository":{"id":53481222,"uuid":"208691060","full_name":"dcasia/nova-filepond","owner":"dcasia","description":"A Nova field for uploading File, Image and Video using Filepond.","archived":false,"fork":false,"pushed_at":"2024-01-31T04:52:12.000Z","size":7555,"stargazers_count":50,"open_issues_count":10,"forks_count":31,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T03:56:15.844Z","etag":null,"topics":["audio","filepond","image","laravel","laravel-nova-field","multiple","nova-4","nova-field","upload","video"],"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/dcasia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"milewski","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2019-09-16T02:16:23.000Z","updated_at":"2025-02-02T16:01:05.000Z","dependencies_parsed_at":"2023-10-12T18:22:17.905Z","dependency_job_id":"b5a5998e-fa25-4178-a945-43afb4efd3d3","html_url":"https://github.com/dcasia/nova-filepond","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.07999999999999996,"last_synced_commit":"703271c8fe86a36281a779c8cf55fbbf403138d5"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fnova-filepond","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fnova-filepond/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fnova-filepond/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fnova-filepond/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcasia","download_url":"https://codeload.github.com/dcasia/nova-filepond/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248155001,"owners_count":21056542,"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":["audio","filepond","image","laravel","laravel-nova-field","multiple","nova-4","nova-field","upload","video"],"created_at":"2024-11-23T19:00:15.445Z","updated_at":"2025-04-10T03:56:38.469Z","avatar_url":"https://github.com/dcasia.png","language":"PHP","funding_links":["https://github.com/sponsors/milewski"],"categories":[],"sub_categories":[],"readme":"# Nova Filepond\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/digital-creative/nova-filepond)](https://packagist.org/packages/digital-creative/nova-filepond)\n[![Total Downloads](https://img.shields.io/packagist/dt/digital-creative/nova-filepond)](https://packagist.org/packages/digital-creative/nova-filepond)\n[![License](https://img.shields.io/packagist/l/digital-creative/nova-filepond)](https://github.com/dcasia/nova-filepond/blob/main/LICENSE)\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/dcasia/nova-filepond/main/screenshots/dark.png\"\u003e\n  \u003cimg alt=\"Laravel Nova Filepond in action\" src=\"https://raw.githubusercontent.com/dcasia/nova-filepond/main/screenshots/light.png\"\u003e\n\u003c/picture\u003e\n\nA Nova field for uploading File, Image and Video using [Filepond](https://github.com/pqina/filepond).\n\n# Installation\n\nYou can install the package via composer:\n\n```shell\ncomposer require digital-creative/nova-filepond\n```\n\n# Features\n\n- Single/Multiple files upload\n- Sortable files\n- Preview images, videos and audio\n- Enable / Disable preview\n- Extends the original Laravel Nova File field giving you access to all the methods/functionality of the default file upload.\n- Drag and drop files\n- Paste files directly from the clipboard\n- Store custom attributes (original file name, size, etc)\n- Prunable files (Auto delete files when the model is deleted)\n- Dark mode support\n\n# Usage\n\nThe field extends the original Laravel Nova File field, so you can use all the methods available in the original field.\n\nBasic usage:\n\n```php\nuse DigitalCreative\\Filepond\\Filepond;\n\nclass Post extends Resource\n{\n    public function fields(NovaRequest $request): array\n    {\n        return [\n            Filepond::make('Images', 'images')\n                -\u003erules('required')\n                -\u003eprunable()\n                -\u003edisablePreview()\n                -\u003emultiple() \n                -\u003elimit(4),\n        ];\n    }\n}\n```\n\nWhen uploading multiple files you will need to cast the attribute to an array in your model class\n\n```php\nclass Post extends Model {\n \n    protected $casts = [\n        'images' =\u003e 'array'\n    ];\n\n}\n```\n\nYou can also store original file name / size by using `storeOriginalName` and `storeOriginalSize` methods.\n\n```php\nuse DigitalCreative\\Filepond\\Filepond;\n\nclass Post extends Resource\n{\n    public function fields(NovaRequest $request): array\n    {\n        return [\n            Filepond::make('Images', 'images')\n                -\u003estoreOriginalName('name')\n                -\u003estoreSize('size')\n                -\u003emultiple(),\n            \n            // or you can manually decide how to store the data\n            // Note: the store method will be called for each file uploaded and the output will be stored into a single json column\n            Filepond::make('Images', 'images')\n                -\u003emultiple()\n                -\u003estore(function (NovaRequest $request, Model $model, string $attribute): array {\n                    return [\n                        $attribute =\u003e $request-\u003eimages-\u003estore('/', 's3'),\n                        'name' =\u003e $request-\u003eimages-\u003egetClientOriginalName(),\n                        'size' =\u003e $request-\u003eimages-\u003egetSize(),\n                        'metadata' =\u003e '...'\n                    ];\n                })\n        ];\n    }\n}\n```\n\u003e Note when using `storeOriginalName` and `storeSize` methods, you will need to add the columns to your database table if you are in \"single\" file mode.\n\n## ⭐️ Show Your Support\n\nPlease give a ⭐️ if this project helped you!\n\n### Other Packages You Might Like\n\n- [Nova Dashboard](https://github.com/dcasia/nova-dashboard) - The missing dashboard for Laravel Nova!\n- [Nova Welcome Card](https://github.com/dcasia/nova-welcome-card) - A configurable version of the `Help card` that comes with Nova.\n- [Icon Action Toolbar](https://github.com/dcasia/icon-action-toolbar) - Replaces the default boring action menu with an inline row of icon-based actions.\n- [Expandable Table Row](https://github.com/dcasia/expandable-table-row) - Provides an easy way to append extra data to each row of your resource tables.\n- [Collapsible Resource Manager](https://github.com/dcasia/collapsible-resource-manager) - Provides an easy way to order and group your resources on the sidebar.\n- [Resource Navigation Tab](https://github.com/dcasia/resource-navigation-tab) - Organize your resource fields into tabs.\n- [Resource Navigation Link](https://github.com/dcasia/resource-navigation-link) - Create links to internal or external resources.\n- [Nova Mega Filter](https://github.com/dcasia/nova-mega-filter) - Display all your filters in a card instead of a tiny dropdown!\n- [Nova Pill Filter](https://github.com/dcasia/nova-pill-filter) - A Laravel Nova filter that renders into clickable pills.\n- [Nova Slider Filter](https://github.com/dcasia/nova-slider-filter) - A Laravel Nova filter for picking range between a min/max value.\n- [Nova Range Input Filter](https://github.com/dcasia/nova-range-input-filter) - A Laravel Nova range input filter.\n- [Nova FilePond](https://github.com/dcasia/nova-filepond) - A Nova field for uploading File, Image and Video using Filepond.\n- [Custom Relationship Field](https://github.com/dcasia/custom-relationship-field) - Emulate HasMany relationship without having a real relationship set between resources.\n- [Column Toggler](https://github.com/dcasia/column-toggler) - A Laravel Nova package that allows you to hide/show columns in the index view.\n- [Batch Edit Toolbar](https://github.com/dcasia/batch-edit-toolbar) - Allows you to update a single column of a resource all at once directly from the index page.\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://raw.githubusercontent.com/dcasia/nova-filepond/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcasia%2Fnova-filepond","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcasia%2Fnova-filepond","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcasia%2Fnova-filepond/lists"}