laravelwebdev/filepond is a Laravel package for a laravel nova field..
It currently has 0 GitHub stars and 1.573 downloads on Packagist (latest version 1.0.3).
Install it with composer require laravelwebdev/filepond.
Discover more Laravel packages by laravelwebdev
or browse all Laravel packages to compare alternatives.
Last updated
A Nova field for uploading File, Image and Video using Filepond.

You can install the package via composer:
composer require laravelwebdev/filepond
The field extends the original Laravel Nova File field, so you can use all the methods available in the original field.
Basic usage:
use Laravelwebdev\Filepond\Filepond;
class Post extends Resource
{
public function fields(NovaRequest $request): array
{
return [
Filepond::make('Images', 'images')
->rules('required')
->prunable()
->disablePreview()
->multiple()
->limit(4),
];
}
}
When uploading multiple files you will need to cast the attribute to an array in your model class
class Post extends Model {
protected $casts = [
'images' => 'array'
];
}
You can also store original file name / size by using storeOriginalName and storeOriginalSize methods.
use Laravelwebdev\Filepond\Filepond;
class Post extends Resource
{
public function fields(NovaRequest $request): array
{
return [
Filepond::make('Images', 'images')
->storeOriginalName('name')
->storeSize('size')
->multiple(),
// or you can manually decide how to store the data
// Note: the store method will be called for each file uploaded and the output will be stored into a single json column
Filepond::make('Images', 'images')
->multiple()
->store(function (NovaRequest $request, Model $model, string $attribute): array {
return [
$attribute => $request->images->store('/', 's3'),
'name' => $request->images->getClientOriginalName(),
'size' => $request->images->getSize(),
'metadata' => '...'
];
})
];
}
}
Note when using
storeOriginalNameandstoreSizemethods, you will need to add the columns to your database table if you are in "single" file mode.
Please give a ⭐️ if this project helped you!
The MIT License (MIT). Please see License File for more information.